mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +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;
|
||||
}
|
||||
|
||||
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(
|
||||
widget.coin,
|
||||
widget.receivingAddress,
|
||||
receivingAddress,
|
||||
queryParams,
|
||||
);
|
||||
|
||||
|
@ -225,10 +233,21 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
|||
@override
|
||||
void initState() {
|
||||
isDesktop = Util.isDesktop;
|
||||
_uriString = Uri(
|
||||
scheme: widget.coin.uriScheme,
|
||||
host: widget.receivingAddress,
|
||||
).toString().replaceFirst("://", ":");
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
_uriString = AddressUtils.buildUriString(
|
||||
widget.coin,
|
||||
receivingAddress,
|
||||
{},
|
||||
);
|
||||
|
||||
amountController = TextEditingController();
|
||||
noteController = TextEditingController();
|
||||
super.initState();
|
||||
|
|
|
@ -132,7 +132,7 @@ extension CoinExt on Coin {
|
|||
case Coin.litecoinTestNet:
|
||||
return "litecoin";
|
||||
case Coin.bitcoincashTestnet:
|
||||
return "bitcoincash";
|
||||
return "bchtest";
|
||||
case Coin.firoTestNet:
|
||||
return "firo";
|
||||
case Coin.dogecoinTestNet:
|
||||
|
|
Loading…
Reference in a new issue