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) {
|
||||
return {
|
||||
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) {
|
||||
const result = await wh.parseAndVerifyVAA(vaa);
|
||||
console.log({ result });
|
||||
transfer.status = 'Failed';
|
||||
transfer.vaa = vaa;
|
||||
//TODO: handle vaa not posted
|
||||
//console.log({ result });
|
||||
} else {
|
||||
console.log({ vaa });
|
||||
transfer.status = 'Error';
|
||||
transfer.vaa = vaa;
|
||||
//TODO: handle empty data
|
||||
//console.log({ vaa });
|
||||
}
|
||||
} catch (e) {
|
||||
console.log({ error: e });
|
||||
|
@ -215,7 +215,6 @@ export const useWormholeTransactions = () => {
|
|||
useEffect(() => {
|
||||
setLoading(true);
|
||||
|
||||
let wormholeSubId = 0;
|
||||
(async () => {
|
||||
// authority -> query for token accounts to get locked assets
|
||||
let authorityKey = await bridgeAuthorityKey(programIds().wormhole.pubkey);
|
||||
|
@ -230,9 +229,6 @@ export const useWormholeTransactions = () => {
|
|||
).then(() => setLoading(false));
|
||||
})();
|
||||
|
||||
return () => {
|
||||
connection.removeProgramAccountChangeListener(wormholeSubId);
|
||||
};
|
||||
}, [connection, setTransfers]);
|
||||
|
||||
const coingeckoTimer = useRef<number>(0);
|
||||
|
|
Loading…
Reference in New Issue