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:
Konstantin Ullrich
2025-08-19 18:28:37 +03:00
committed by GitHub
parent c8dca29f68
commit cb53840332
3 changed files with 36 additions and 7 deletions
+4 -3
View File
@@ -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)) {