diff options
author | Sebastian <sebasjm@gmail.com> | 2022-04-18 16:20:10 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-04-18 16:20:54 -0300 |
commit | c3e65fb49d7ac0cf5c3d79bd2b0258c0498eef18 (patch) | |
tree | 0c0efd8eb2e433b3638308efd25a30eb712c812d /packages | |
parent | 9d997280d36b3bd41532017a167410db4dcec696 (diff) |
urgent fix: take currency from amount, dont assume BTC
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-util/src/bitcoin.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/taler-util/src/bitcoin.ts b/packages/taler-util/src/bitcoin.ts index cf9d52c40..b5cafbbad 100644 --- a/packages/taler-util/src/bitcoin.ts +++ b/packages/taler-util/src/bitcoin.ts @@ -64,10 +64,10 @@ export function generateFakeSegwitAddress( addr[0] === "t" && addr[1] == "b" ? "tb" : addr[0] === "b" && addr[1] == "c" && addr[2] === "r" && addr[3] == "t" - ? "bcrt" - : addr[0] === "b" && addr[1] == "c" - ? "bc" - : undefined; + ? "bcrt" + : addr[0] === "b" && addr[1] == "c" + ? "bc" + : undefined; if (prefix === undefined) throw new Error("unknown bitcoin net"); return { @@ -77,6 +77,6 @@ export function generateFakeSegwitAddress( } // https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp -export function segwitMinAmount(): AmountJson { - return Amounts.parseOrThrow("BTC:0.00000294"); +export function segwitMinAmount(currency: string): AmountJson { + return Amounts.parseOrThrow(`${currency}:0.00000294`); } |