diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-03 17:49:59 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-03 17:50:20 -0300 |
commit | 245f584fb1f95b54d319d510f452188d6824766a (patch) | |
tree | ae868cf9f6a68e33c81bbedbe5db28734c107c62 | |
parent | 7d8acca7f948ded5f188e2fb9af6b0a11f9c0572 (diff) |
use new segwit impl
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx | 25 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx | 7 |
2 files changed, 30 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx index 16ce6120a..2b9e60cb5 100644 --- a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.stories.tsx @@ -63,3 +63,28 @@ export const Bitcoin = createExample(TestedComponent, { }, 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 diff --git a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx index 08326f828..66e9cd21e 100644 --- a/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ReserveCreated.tsx @@ -2,9 +2,9 @@ import { AmountJson, parsePaytoUri, i18n, - generateSegwitAddress, Amounts, segwitMinAmount, + generateFakeSegwitAddress, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType"; @@ -40,7 +40,10 @@ export function ReserveCreated({ function TransferDetails(): VNode { if (!paytoURI) return <Fragment />; if (paytoURI.targetType === "bitcoin") { - const { segwitAddr1, segwitAddr2 } = generateSegwitAddress(reservePub); + const { segwitAddr1, segwitAddr2 } = generateFakeSegwitAddress( + reservePub, + paytoURI.targetPath, + ); const min = segwitMinAmount(); return ( <section> |