mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
fix:near intents fixed-rate underpayment (#3247)
This commit is contained in:
@@ -251,6 +251,11 @@ class NearIntentsExchangeProvider extends ExchangeProvider {
|
||||
final quoteObj = quote['quote'] as Map<String, dynamic>;
|
||||
final depositAddress = quoteObj['depositAddress'] as String;
|
||||
final depositMemo = quoteObj['depositMemo'] as String?;
|
||||
final depositAmount = quoteObj['amountInFormatted'] as String?;
|
||||
|
||||
if (depositAmount == null) {
|
||||
throw Exception('Deposit amount is null in quote response');
|
||||
}
|
||||
|
||||
final quoteRequest = quote['quoteRequest'] as Map<String, dynamic>;
|
||||
final fromAssetId = quoteRequest['originAsset'] as String;
|
||||
@@ -284,7 +289,7 @@ class NearIntentsExchangeProvider extends ExchangeProvider {
|
||||
inputAddress: depositAddress,
|
||||
payoutAddress: request.toAddress,
|
||||
refundAddress: request.refundAddress,
|
||||
amount: request.fromAmount,
|
||||
amount: depositAmount,
|
||||
receiveAmount: quoteObj['amountOutFormatted']?.toString(),
|
||||
memo: depositMemo,
|
||||
isSendAll: isSendAll,
|
||||
|
||||
Reference in New Issue
Block a user