Skip to content

Commit

Permalink
fix on mainent api call
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisZerbib committed Jun 4, 2024
1 parent 9bd3ac0 commit b4570f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/WalletTxList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const WalletTxList: React.FC<WalletTxListProps> = ({ walletAddress }) => {
? "https://toncenter.com/api/v2/jsonRPC"
: "https://testnet.toncenter.com/api/v2/jsonRPC",
});
const url = network === CHAIN.MAINNET ? "" : "testnet";
const url = network === CHAIN.MAINNET ? "" : "testnet.";
//testnet.tonapi.io/v2/blockchain/accounts/0%3A85105e63637de52c526e809985b882d841cc20ede907bbc2d5b01a55ec96c84f/transactions?limit=100&sort_order=desc

const address = Address.parse(walletAddress);
const myPrivateWallet =
"0:85105e63637de52c526e809985b882d841cc20ede907bbc2d5b01a55ec96c84f";
const queryToGetTransactions = `https://${url}.tonapi.io/v2/blockchain/accounts/${address.toString()}/transactions?limit=100&sort_order=desc`;
const queryToGetTransactions = `https://${url}tonapi.io/v2/blockchain/accounts/${address.toString()}/transactions?limit=100&sort_order=desc`;
const response = await fetch(queryToGetTransactions);
const { transactions } = await response.json();

Expand Down

0 comments on commit b4570f3

Please sign in to comment.