Skip to content

Commit

Permalink
fix(payment-processor): USDC on Near is now standard
Browse files Browse the repository at this point in the history
  • Loading branch information
yomarion committed Oct 26, 2023
1 parent 9414820 commit d271d31
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/payment-processor/src/payment/utils-near.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ export const isReceiverReady = async (
tokenAddress: string,
paymentAddress: string,
): Promise<boolean> => {
if ((await isReceiverReadyUSDC(walletConnection, tokenAddress, paymentAddress)) === true) {
return true;
}
const fungibleContract = new Contract(walletConnection.account(), tokenAddress, {
changeMethods: [],
viewMethods: ['storage_balance_of'],
Expand All @@ -255,19 +252,3 @@ export const isReceiverReady = async (
})) as StorageBalance | null;
return !!storage && BigNumber.from(storage?.total).gte(MIN_STORAGE_FOR_FUNGIBLE);
};

const isReceiverReadyUSDC = async (
walletConnection: WalletConnection,
tokenAddress: string,
paymentAddress: string,
): Promise<boolean> => {
if (tokenAddress !== '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1')
return false;
const fungibleContract = new Contract(walletConnection.account(), tokenAddress, {
changeMethods: [],
viewMethods: ['check_registration'],
}) as any;
return await fungibleContract.check_registration({
account_id: paymentAddress,
});
};

0 comments on commit d271d31

Please sign in to comment.