Skip to content

Commit

Permalink
clients/js: upgrade typescript version
Browse files Browse the repository at this point in the history
  • Loading branch information
panoel committed May 23, 2024
1 parent 60fa4ef commit 1745c3d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 76 deletions.
75 changes: 8 additions & 67 deletions clients/js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@
"copy-dir": "^1.3.0",
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "^4.6"
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion clients/js/src/cmds/sui/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const addSetupCommands: YargsAddCommandsFn = (y: typeof yargs) =>
dotenv.config({ path: envPath });

const tx = new TransactionBlock();
setMaxGasBudgetDevnet("DEVNET", tx);
setMaxGasBudgetDevnet("Devnet", tx);
const registrations: { chain: Chain; module: string }[] = [];
for (const key in process.env) {
if (/^REGISTER_(.+)_TOKEN_BRIDGE_VAA$/.test(key)) {
Expand Down
20 changes: 13 additions & 7 deletions clients/js/src/injective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ import { NETWORKS } from "./consts";
import { impossible, Payload } from "./vaa";
import { transferFromInjective } from "@certusone/wormhole-sdk/lib/esm/token_bridge/injective";
import { tryNativeToUint8Array } from "@certusone/wormhole-sdk/lib/esm/utils";
import { Chain, contracts, Network } from "@wormhole-foundation/sdk-base";
import {
Chain,
chainToChainId,
contracts,
Network,
} from "@wormhole-foundation/sdk-base";
import { chains } from "@wormhole-foundation/sdk/dist/cjs";

export async function execute_injective(
payload: Payload,
Expand Down Expand Up @@ -188,8 +194,8 @@ export async function transferInjective(
token_bridge,
tokenAddress,
amount,
dstChain,
tryNativeToUint8Array(dstAddress, dstChain)
chainToChainId(dstChain),
tryNativeToUint8Array(dstAddress, chainToChainId(dstChain))
);

await signAndSendTx(walletPK, network, msgs);
Expand Down Expand Up @@ -291,14 +297,14 @@ export async function queryRegistrationsInjective(

// Query the bridge registration for all the chains in parallel.
const registrations: (any | null)[][] = await Promise.all(
Object.entries(CHAINS)
.filter(([cname, _]) => cname !== chain && cname !== "unset")
.map(async ([cname, cid]) => [
chains
.filter((cname) => cname !== chain)
.map(async (cname) => [
cname,
await (async () => {
let query_msg = {
chain_registration: {
chain: cid,
chain: chainToChainId(cname),
},
};

Expand Down
1 change: 1 addition & 0 deletions clients/js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"outDir": "./build",
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"strict": true
},
Expand Down

0 comments on commit 1745c3d

Please sign in to comment.