urgent fix: take currency from amount, dont assume BTC
This commit is contained in:
parent
9d997280d3
commit
c3e65fb49d
@ -64,10 +64,10 @@ export function generateFakeSegwitAddress(
|
|||||||
addr[0] === "t" && addr[1] == "b"
|
addr[0] === "t" && addr[1] == "b"
|
||||||
? "tb"
|
? "tb"
|
||||||
: addr[0] === "b" && addr[1] == "c" && addr[2] === "r" && addr[3] == "t"
|
: addr[0] === "b" && addr[1] == "c" && addr[2] === "r" && addr[3] == "t"
|
||||||
? "bcrt"
|
? "bcrt"
|
||||||
: addr[0] === "b" && addr[1] == "c"
|
: addr[0] === "b" && addr[1] == "c"
|
||||||
? "bc"
|
? "bc"
|
||||||
: undefined;
|
: undefined;
|
||||||
if (prefix === undefined) throw new Error("unknown bitcoin net");
|
if (prefix === undefined) throw new Error("unknown bitcoin net");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -77,6 +77,6 @@ export function generateFakeSegwitAddress(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp
|
// https://github.com/bitcoin/bitcoin/blob/master/src/policy/policy.cpp
|
||||||
export function segwitMinAmount(): AmountJson {
|
export function segwitMinAmount(currency: string): AmountJson {
|
||||||
return Amounts.parseOrThrow("BTC:0.00000294");
|
return Amounts.parseOrThrow(`${currency}:0.00000294`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user