Skip to content

Commit

Permalink
Merge pull request #1064 from oraidex/feat/remove-error-ata
Browse files Browse the repository at this point in the history
remove unused Solana connection logic in balance transfer
  • Loading branch information
perfogic authored Dec 5, 2024
2 parents 5e870e5 + 7f2db91 commit 49398bf
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/pages/Balance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -537,23 +537,6 @@ const Balance: React.FC<BalanceProps> = () => {

if (isSolToOraichain || isOraichainToSol) {
if (isOraichainToSol) {
const connection = new Connection(SOLANA_RPC, 'confirmed');
const tokenAccountPubkey = new PublicKey(solAddress);
console.log({
newToToken: newToToken.contractAddress,
solAddress
});

const tokenAccount = await getAssociatedTokenAddress(
new PublicKey(newToToken.contractAddress),
tokenAccountPubkey
);

const getTokenAccount = await connection.getAccountInfo(tokenAccount);
if ((getTokenAccount?.lamports || 0) === 0) {
throw generateError('The destination token account is not initalized! Please try with an active account!');
}

return handleTransferOraichainToSol({ fromToken: from, transferAmount: fromAmount });
}

Expand Down

0 comments on commit 49398bf

Please sign in to comment.