Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused Solana connection logic in balance transfer #1064

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading