Skip to content

Commit

Permalink
update var naming for estimated fee
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Dec 8, 2023
1 parent 2ef5f67 commit bb61ef3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/screens/Payment/Processing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down

0 comments on commit bb61ef3

Please sign in to comment.