Skip to content

Commit

Permalink
fix: DIP20_AMOUNT_MAP
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAaCE committed Aug 23, 2022
1 parent 74ebb99 commit dc8e2fb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const ICP_DECIMALS = 8;
export const getAssetData = (canisterId) => Object.values(TOKENS).find((token) => token.canisterId === canisterId);

const DIP20_AMOUNT_MAP = {
transfer: (args) => args?.[0]?.amount / (10 ** CYCLE_DECIMALS),
transfer: (args) => args?.[1] / (10 ** CYCLE_DECIMALS),
transferErc20: (args) => args?.[1] / (10 ** CYCLE_DECIMALS),
transferFrom: (args) => args?.[2] / (10 ** CYCLE_DECIMALS),

};

const ICP_AMOUNT_MAP = (args) => args?.[0]?.amount?.e8s / (10 ** ICP_DECIMALS);
Expand Down

0 comments on commit dc8e2fb

Please sign in to comment.