mirror of https://github.com/certusone/oyster.git
fixed crash error and undefined text (#66)
This commit is contained in:
parent
fdaf1c4e73
commit
7d435d84fb
|
@ -145,7 +145,7 @@ export const RecentTransactionsTable = () => {
|
||||||
render(text: string, record: any) {
|
render(text: string, record: any) {
|
||||||
return {
|
return {
|
||||||
props: { style: {} },
|
props: { style: {} },
|
||||||
children: <span className={`${text.toLowerCase()}`}>{text}</span>,
|
children: <span className={`${record.status?.toLowerCase()}`}>{record.status}</span>,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -176,15 +176,15 @@ const queryWrappedMetaTransactions = async (
|
||||||
);
|
);
|
||||||
if (vaa?.length) {
|
if (vaa?.length) {
|
||||||
const result = await wh.parseAndVerifyVAA(vaa);
|
const result = await wh.parseAndVerifyVAA(vaa);
|
||||||
console.log({ result });
|
|
||||||
transfer.status = 'Failed';
|
transfer.status = 'Failed';
|
||||||
transfer.vaa = vaa;
|
transfer.vaa = vaa;
|
||||||
//TODO: handle vaa not posted
|
//TODO: handle vaa not posted
|
||||||
|
//console.log({ result });
|
||||||
} else {
|
} else {
|
||||||
console.log({ vaa });
|
|
||||||
transfer.status = 'Error';
|
transfer.status = 'Error';
|
||||||
transfer.vaa = vaa;
|
transfer.vaa = vaa;
|
||||||
//TODO: handle empty data
|
//TODO: handle empty data
|
||||||
|
//console.log({ vaa });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log({ error: e });
|
console.log({ error: e });
|
||||||
|
@ -215,7 +215,6 @@ export const useWormholeTransactions = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
let wormholeSubId = 0;
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// authority -> query for token accounts to get locked assets
|
// authority -> query for token accounts to get locked assets
|
||||||
let authorityKey = await bridgeAuthorityKey(programIds().wormhole.pubkey);
|
let authorityKey = await bridgeAuthorityKey(programIds().wormhole.pubkey);
|
||||||
|
@ -230,9 +229,6 @@ export const useWormholeTransactions = () => {
|
||||||
).then(() => setLoading(false));
|
).then(() => setLoading(false));
|
||||||
})();
|
})();
|
||||||
|
|
||||||
return () => {
|
|
||||||
connection.removeProgramAccountChangeListener(wormholeSubId);
|
|
||||||
};
|
|
||||||
}, [connection, setTransfers]);
|
}, [connection, setTransfers]);
|
||||||
|
|
||||||
const coingeckoTimer = useRef<number>(0);
|
const coingeckoTimer = useRef<number>(0);
|
||||||
|
|
Loading…
Reference in New Issue