mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
manually add bch uri fixes from 28da2b8900
This commit is contained in:
parent
9d7a052ca0
commit
be952d3e35
2 changed files with 25 additions and 6 deletions
|
@ -111,9 +111,17 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
||||||
queryParams["message"] = noteString;
|
queryParams["message"] = noteString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String receivingAddress = widget.receivingAddress;
|
||||||
|
if ((widget.coin == Coin.bitcoincash ||
|
||||||
|
widget.coin == Coin.bitcoincashTestnet) &&
|
||||||
|
receivingAddress.contains(":")) {
|
||||||
|
// remove cash addr prefix
|
||||||
|
receivingAddress = receivingAddress.split(":").sublist(1).join();
|
||||||
|
}
|
||||||
|
|
||||||
final uriString = AddressUtils.buildUriString(
|
final uriString = AddressUtils.buildUriString(
|
||||||
widget.coin,
|
widget.coin,
|
||||||
widget.receivingAddress,
|
receivingAddress,
|
||||||
queryParams,
|
queryParams,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -225,10 +233,21 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
isDesktop = Util.isDesktop;
|
isDesktop = Util.isDesktop;
|
||||||
_uriString = Uri(
|
|
||||||
scheme: widget.coin.uriScheme,
|
String receivingAddress = widget.receivingAddress;
|
||||||
host: widget.receivingAddress,
|
if ((widget.coin == Coin.bitcoincash ||
|
||||||
).toString().replaceFirst("://", ":");
|
widget.coin == Coin.bitcoincashTestnet) &&
|
||||||
|
receivingAddress.contains(":")) {
|
||||||
|
// remove cash addr prefix
|
||||||
|
receivingAddress = receivingAddress.split(":").sublist(1).join();
|
||||||
|
}
|
||||||
|
|
||||||
|
_uriString = AddressUtils.buildUriString(
|
||||||
|
widget.coin,
|
||||||
|
receivingAddress,
|
||||||
|
{},
|
||||||
|
);
|
||||||
|
|
||||||
amountController = TextEditingController();
|
amountController = TextEditingController();
|
||||||
noteController = TextEditingController();
|
noteController = TextEditingController();
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
|
@ -132,7 +132,7 @@ extension CoinExt on Coin {
|
||||||
case Coin.litecoinTestNet:
|
case Coin.litecoinTestNet:
|
||||||
return "litecoin";
|
return "litecoin";
|
||||||
case Coin.bitcoincashTestnet:
|
case Coin.bitcoincashTestnet:
|
||||||
return "bitcoincash";
|
return "bchtest";
|
||||||
case Coin.firoTestNet:
|
case Coin.firoTestNet:
|
||||||
return "firo";
|
return "firo";
|
||||||
case Coin.dogecoinTestNet:
|
case Coin.dogecoinTestNet:
|
||||||
|
|
Loading…
Reference in a new issue