use new segwit impl
This commit is contained in:
parent
7d8acca7f9
commit
245f584fb1
@ -63,3 +63,28 @@ export const Bitcoin = createExample(TestedComponent, {
|
|||||||
},
|
},
|
||||||
exchangeBaseUrl: "https://exchange.demo.taler.net",
|
exchangeBaseUrl: "https://exchange.demo.taler.net",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const BitcoinRegTest = createExample(TestedComponent, {
|
||||||
|
reservePub: "0ZSX8SH0M30KHX8K3Y1DAMVGDQV82XEF9DG1HC4QMQ3QWYT4AF00",
|
||||||
|
payto:
|
||||||
|
"payto://bitcoin/bcrt1q6ps8qs6v8tkqrnru4xqqqa6rfwcx5ufpdfqht4?amount=BTC:0.1&subject=0ZSX8SH0M30KHX8K3Y1DAMVGDQV82XEF9DG1HC4QMQ3QWYT4AF00",
|
||||||
|
amount: {
|
||||||
|
currency: "BTC",
|
||||||
|
value: 0,
|
||||||
|
fraction: 14000000,
|
||||||
|
},
|
||||||
|
exchangeBaseUrl: "https://exchange.demo.taler.net",
|
||||||
|
});
|
||||||
|
export const BitcoinTest = createExample(TestedComponent, {
|
||||||
|
reservePub: "0ZSX8SH0M30KHX8K3Y1DAMVGDQV82XEF9DG1HC4QMQ3QWYT4AF00",
|
||||||
|
payto:
|
||||||
|
"payto://bitcoin/tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx?amount=BTC:0.1&subject=0ZSX8SH0M30KHX8K3Y1DAMVGDQV82XEF9DG1HC4QMQ3QWYT4AF00",
|
||||||
|
amount: {
|
||||||
|
currency: "BTC",
|
||||||
|
value: 0,
|
||||||
|
fraction: 14000000,
|
||||||
|
},
|
||||||
|
exchangeBaseUrl: "https://exchange.demo.taler.net",
|
||||||
|
});
|
||||||
|
// tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx OK
|
||||||
|
// tb10v8ahvcqqleage3q5rqn3agnr7pd25msd5wd4hcj
|
||||||
|
@ -2,9 +2,9 @@ import {
|
|||||||
AmountJson,
|
AmountJson,
|
||||||
parsePaytoUri,
|
parsePaytoUri,
|
||||||
i18n,
|
i18n,
|
||||||
generateSegwitAddress,
|
|
||||||
Amounts,
|
Amounts,
|
||||||
segwitMinAmount,
|
segwitMinAmount,
|
||||||
|
generateFakeSegwitAddress,
|
||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType";
|
import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType";
|
||||||
@ -40,7 +40,10 @@ export function ReserveCreated({
|
|||||||
function TransferDetails(): VNode {
|
function TransferDetails(): VNode {
|
||||||
if (!paytoURI) return <Fragment />;
|
if (!paytoURI) return <Fragment />;
|
||||||
if (paytoURI.targetType === "bitcoin") {
|
if (paytoURI.targetType === "bitcoin") {
|
||||||
const { segwitAddr1, segwitAddr2 } = generateSegwitAddress(reservePub);
|
const { segwitAddr1, segwitAddr2 } = generateFakeSegwitAddress(
|
||||||
|
reservePub,
|
||||||
|
paytoURI.targetPath,
|
||||||
|
);
|
||||||
const min = segwitMinAmount();
|
const min = segwitMinAmount();
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
|
Loading…
Reference in New Issue
Block a user