Skip to content

Commit

Permalink
update: renamed query fn for sui
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyaRouterP committed Nov 21, 2024
1 parent f38a1b0 commit 91e72c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/react/src/actions/getToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { getCosmosTokenBalanceAndAllowance, getCosmosTokenMetadata } from './cos
import { getEVMTokenBalanceAndAllowance, getEVMTokenMetadata } from './evm/getEVMToken.js';
import { viewMethodOnNear } from './near/readCalls.js';
import { getSolanaTokenBalanceAndAllowance } from './solana/getSolanaToken.js';
import { querySui } from './sui/querySui.js';
import { getSuiTokenInfo } from './sui/getSuiTokenInfo.js';
import { getTonTokenBalanceAndAllowance, getTonTokenMetadata } from './ton/getTonToken.js';

/**
Expand Down Expand Up @@ -141,7 +141,7 @@ export const getTokenMetadata = async ({ token, chain, config }: GetTokenMetadat

let res;
try {
res = await querySui({
res = await getSuiTokenInfo({
chain,
method: 'suix_getCoinMetadata',
params: [token],
Expand Down Expand Up @@ -290,7 +290,7 @@ export const getTokenBalanceAndAllowance = (async (params) => {
let balance = 0n;

try {
const balanceResponse = await querySui({ chain, method: 'suix_getBalance', params: [account, token] });
const balanceResponse = await getSuiTokenInfo({ chain, method: 'suix_getBalance', params: [account, token] });
balance = BigInt(balanceResponse.totalBalance);
} catch (error) {
console.error('Error fetching Sui token balance:', error);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChainData } from '../../types/index.js';

export const querySui = async ({
export const getSuiTokenInfo = async ({
chain,
method,
params,
Expand Down

0 comments on commit 91e72c7

Please sign in to comment.