fixed crash error and undefined text (#66)

This commit is contained in:
Juan Diego García 2021-04-15 07:57:07 -05:00 committed by GitHub
parent fdaf1c4e73
commit 7d435d84fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -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>,
}; };
}, },
}, },

View File

@ -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);