mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
CW-1146-Enable-Zano-buy-sell-for-DFX (#2458)
* feat(CW-1148): Add Zano wallet support for message * refactor(CW-1148): Simplify `signMessage` logic in Zano wallet API * fix: remove unsupported wallet types from DFX Buy provider * fix: correct DFX Buy provider parameter name from `amount` to `amount-in`
This commit is contained in:
@@ -62,9 +62,9 @@ class DFXBuyProvider extends BuyProvider {
|
||||
String get blockchain {
|
||||
switch (wallet.type) {
|
||||
case WalletType.bitcoin:
|
||||
case WalletType.bitcoinCash:
|
||||
case WalletType.litecoin:
|
||||
return 'Bitcoin';
|
||||
case WalletType.zano:
|
||||
return 'Zano';
|
||||
default:
|
||||
return walletTypeToString(wallet.type);
|
||||
}
|
||||
@@ -131,6 +131,7 @@ class DFXBuyProvider extends BuyProvider {
|
||||
case WalletType.litecoin:
|
||||
case WalletType.bitcoin:
|
||||
case WalletType.bitcoinCash:
|
||||
case WalletType.zano:
|
||||
return await wallet.signMessage(message, address: walletAddress);
|
||||
default:
|
||||
throw Exception("WalletType is not available for DFX ${wallet.type}");
|
||||
@@ -345,7 +346,7 @@ class DFXBuyProvider extends BuyProvider {
|
||||
'asset-out': isBuyAction ? quote.cryptoCurrency.toString() : quote.fiatCurrency.toString(),
|
||||
'blockchain': blockchain,
|
||||
'asset-in': isBuyAction ? quote.fiatCurrency.toString() : quote.cryptoCurrency.toString(),
|
||||
'amount': amount.toString() //TODO: Amount does not work
|
||||
'amount-in': amount.toString()
|
||||
});
|
||||
|
||||
if (await canLaunchUrl(uri)) {
|
||||
|
||||
Reference in New Issue
Block a user