Skip to content

Commit

Permalink
[FIX] invoices rates for erc20
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbazan7 committed Feb 13, 2024
1 parent 71a3d7c commit fcb9bf4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
30 changes: 19 additions & 11 deletions src/navigation/wallet/screens/send/confirm/PayProConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ import {sleep} from '../../../../../utils/helper-methods';
import {startOnGoingProcessModal} from '../../../../../store/app/app.effects';
import {dismissOnGoingProcessModal} from '../../../../../store/app/app.actions';
import {BuildPayProWalletSelectorList} from '../../../../../store/wallet/utils/wallet';
import {GetFeeUnits} from '../../../../../store/wallet/utils/currency';
import {
GetFeeUnits,
IsERCToken,
} from '../../../../../store/wallet/utils/currency';
import {
InfoDescription,
InfoHeader,
Expand Down Expand Up @@ -429,15 +432,21 @@ const PayProConfirm = () => {
) : null}
</>
) : null}
<Amount
description={'Total'}
amount={total}
height={83}
showInfoIcon={true}
infoIconOnPress={() => {
dispatch(showConfirmAmountInfoSheet('total'));
}}
/>
{wallet ? (
<Amount
description={'Total'}
amount={total}
height={
IsERCToken(wallet.currencyAbbreviation, wallet.chain)
? 110
: 83
}
showInfoIcon={true}
infoIconOnPress={() => {
dispatch(showConfirmAmountInfoSheet('total'));
}}
/>
) : null}
</>
) : null}
</DetailsList>
Expand Down Expand Up @@ -475,7 +484,6 @@ const PayProConfirm = () => {
walletId: wallet!.id,
key,
});

}}
/>
</ConfirmScrollView>
Expand Down
5 changes: 4 additions & 1 deletion src/store/wallet/effects/send/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ export const buildTxDetails =

const selectedTransactionCurrency =
invoice?.buyerProvidedInfo!.selectedTransactionCurrency ||
wallet.currencyAbbreviation.toUpperCase();
getCurrencyCodeFromCoinAndChain(
wallet.currencyAbbreviation,
wallet.chain,
);

const isOffChain = !proposal;
if (invoice && selectedTransactionCurrency) {
Expand Down

0 comments on commit fcb9bf4

Please sign in to comment.