update staking

This commit is contained in:
Pham Tu 2024-01-31 14:10:59 +07:00
parent c8b672cb31
commit dbb95626b2
No known key found for this signature in database
GPG Key ID: 7460FD99133ADA1C

View File

@ -151,10 +151,10 @@ function mapAmount(events: readonly Event[]) {
if (!events) return [];
return events
.find((x) => x.type === 'coin_received')
?.attributes.filter((x) => toBase64(x.key) === 'YW1vdW50')
.map((x) =>
toBase64(x.key) === 'YW1vdW50' ? fromAscii(x.value) : toBase64(x.value)
);
?.attributes.filter(
(x) => (typeof x.key === 'string' ? x.key : fromAscii(x.key)) === 'amount'
)
.map((x) => x.value);
}
</script>
<template>