diff --git a/src/screens/Payment/Processing.tsx b/src/screens/Payment/Processing.tsx index d9801f6e..f8f02338 100644 --- a/src/screens/Payment/Processing.tsx +++ b/src/screens/Payment/Processing.tsx @@ -186,11 +186,11 @@ export default function ProcessingScreen({ navigation, route }: TProcessingPageP return handleError({ e: 'Auto-mint-swap currently only supports a single source mint.' }) } // TODO this process can take a while, we need to add it as pending transaction? - const { payResult, requestTokenResult, estFee } = await fullAutoMintSwap(tokenInfo, targetMint.mintUrl) + const { payResult, requestTokenResult, estFeeResp } = await fullAutoMintSwap(tokenInfo, targetMint.mintUrl) if (!payResult || !requestTokenResult) { return handleError({ e: 'payResult or requestTokenResult is undefined' }) } - const amountSent = tokenInfo.value - estFee + const amountSent = tokenInfo.value - estFeeResp // add as history entry (multimint swap) await addToHistory({ amount: -amountSent, @@ -203,7 +203,7 @@ export default function ProcessingScreen({ navigation, route }: TProcessingPageP navigation.navigate('success', { amount: amountSent, fee: payResult.realFee, - change: estFee - (payResult.realFee || 0), + change: estFeeResp - (payResult.realFee || 0), isMelt: true }) } diff --git a/src/wallet/index.ts b/src/wallet/index.ts index e1b35571..834b9c9e 100644 --- a/src/wallet/index.ts +++ b/src/wallet/index.ts @@ -236,7 +236,7 @@ export async function fullAutoMintSwap(tokenInfo: ITokenInfo, destMintUrl: strin proofs ) l('[fullAutoMintSwap]', { payResult, requestTokenResult }) - return { payResult, requestTokenResult, estFee } + return { payResult, requestTokenResult, estFeeResp: estFee } } catch (e) { return { payResult: undefined, requestTokenResult: undefined } }