Skip to content

Commit b4a1547

Browse files
committed
Fix aptos
1 parent 40aa795 commit b4a1547

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

database/src/token_bridge/address.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
contracts,
1212
encoding,
1313
} from '@wormhole-foundation/sdk-base';
14-
import { AptosClient } from 'aptos';
14+
import { Aptos, AptosConfig, Network as AptosNetwork } from '@aptos-labs/ts-sdk';
1515
import { connect } from 'near-api-js';
1616
import { AptosTokenBridge } from '@wormhole-foundation/sdk-aptos-tokenbridge';
1717
import { wormhole } from '@wormhole-foundation/sdk';
@@ -60,7 +60,11 @@ export const getNativeAddress = async (
6060
);
6161
} else if (tokenChain === chainToChainId('Aptos')) {
6262
const wh = await wormhole('Mainnet', [aptos]);
63-
const client = new AptosClient('https://fullnode.mainnet.aptoslabs.com');
63+
const config = new AptosConfig({
64+
fullnode: 'https://fullnode.mainnet.aptoslabs.com',
65+
network: AptosNetwork.MAINNET,
66+
});
67+
const client = new Aptos();
6468
const contracts = wh.getContracts('Aptos');
6569
if (!contracts) {
6670
return null;

0 commit comments

Comments
 (0)