Skip to content

Commit

Permalink
bumped sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
kev1n-peters committed Dec 22, 2022
1 parent 70099d6 commit 8c6ffb4
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 86 deletions.
318 changes: 259 additions & 59 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@certusone/wormhole-sdk": "^0.9.4",
"@certusone/wormhole-sdk": "^0.9.8",
"@injectivelabs/sdk-ts": "^1.0.211",
"@injectivelabs/ts-types": "^1.0.14",
"@injectivelabs/tx-ts": "^1.0.43",
Expand Down
42 changes: 21 additions & 21 deletions src/components/InjectiveConnectWalletDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Wallet } from "@injectivelabs/wallet-ts";
import { useCallback } from "react";
import {
InjectiveWalletInfo,
SUPPORTED_WALLETS,
getSupportedWallets,
useInjectiveContext,
} from "../contexts/InjectiveWalletContext";

Expand Down Expand Up @@ -78,27 +78,27 @@ const InjectiveConnectWalletDialog = ({
const { connect } = useInjectiveContext();
const classes = useStyles();

const installedWallets = SUPPORTED_WALLETS.filter(
(walletInfo) => walletInfo.isInstalled
).map((walletInfo) => (
<WalletOptions
walletInfo={walletInfo}
connect={connect}
onClose={onClose}
key={walletInfo.name}
/>
));
const installedWallets = getSupportedWallets()
.filter((walletInfo) => walletInfo.isInstalled)
.map((walletInfo) => (
<WalletOptions
walletInfo={walletInfo}
connect={connect}
onClose={onClose}
key={walletInfo.name}
/>
));

const undetectedWallets = SUPPORTED_WALLETS.filter(
(walletInfo) => !walletInfo.isInstalled
).map((walletInfo) => (
<WalletOptions
walletInfo={walletInfo}
connect={connect}
onClose={onClose}
key={walletInfo.name}
/>
));
const undetectedWallets = getSupportedWallets()
.filter((walletInfo) => !walletInfo.isInstalled)
.map((walletInfo) => (
<WalletOptions
walletInfo={walletInfo}
connect={connect}
onClose={onClose}
key={walletInfo.name}
/>
));

return (
<Dialog open={isOpen} onClose={onClose}>
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/InjectiveWalletContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface InjectiveWalletInfo {
url: string;
}

export const SUPPORTED_WALLETS: InjectiveWalletInfo[] = [
export const getSupportedWallets = (): InjectiveWalletInfo[] => [
{
wallet: Wallet.Keplr,
name: "Keplr",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useHandleCreateWrapped.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ async function injective(
msg,
"Wormhole - Create Wrapped"
);
dispatch(setCreateTx({ id: tx.txhash, block: tx.height }));
dispatch(setCreateTx({ id: tx.txHash, block: tx.height }));
enqueueSnackbar(null, {
content: <Alert severity="success">Transaction confirmed</Alert>,
});
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useHandleRedeem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ async function injective(
msg,
"Wormhole - Complete Transfer"
);
dispatch(setRedeemTx({ id: tx.txhash, block: tx.height }));
dispatch(setRedeemTx({ id: tx.txHash, block: tx.height }));
enqueueSnackbar(null, {
content: <Alert severity="success">Transaction confirmed</Alert>,
});
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useHandleTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ async function injective(
msgs,
"Wormhole - Initiate Transfer"
);
dispatch(setTransferTx({ id: tx.txhash, block: tx.height }));
dispatch(setTransferTx({ id: tx.txHash, block: tx.height }));
enqueueSnackbar(null, {
content: <Alert severity="success">Transaction confirmed</Alert>,
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/injective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const broadcastInjectiveTx = async (
address: walletAddress,
memo,
});
const tx = await client.fetchTx(txHash);
const tx = await client.fetchTxPoll(txHash);
if (!tx) {
throw new Error("Unable to fetch transaction");
}
Expand Down

0 comments on commit 8c6ffb4

Please sign in to comment.