mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Fixed qr image on Receive screen for Litecoin (#296)
This commit is contained in:
parent
c10d5ef83c
commit
d88ecdb2bb
1 changed files with 20 additions and 0 deletions
|
@ -60,6 +60,22 @@ class BitcoinURI extends PaymentURI {
|
|||
}
|
||||
}
|
||||
|
||||
class LitecoinURI extends PaymentURI {
|
||||
LitecoinURI({String amount, String address})
|
||||
: super(amount: amount, address: address);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
var base = 'litecoin:' + address;
|
||||
|
||||
if (amount?.isNotEmpty ?? false) {
|
||||
base += '?amount=${amount.replaceAll(',', '.')}';
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
|
||||
abstract class WalletAddressListViewModelBase with Store {
|
||||
WalletAddressListViewModelBase({
|
||||
@required AppStore appStore,
|
||||
|
@ -121,6 +137,10 @@ abstract class WalletAddressListViewModelBase with Store {
|
|||
return BitcoinURI(amount: amount, address: address.address);
|
||||
}
|
||||
|
||||
if (_wallet.type == WalletType.litecoin) {
|
||||
return LitecoinURI(amount: amount, address: address.address);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue