fix: fixed transaction messages (#792)

This commit is contained in:
Linkie Link 2024-02-12 11:16:41 +01:00 committed by GitHub
parent ffa5abb55b
commit db1d712274
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ export default function getTokenOutFromSwapResponse(
try {
if (response.result?.response.code === 0) {
const rawLogs = JSON.parse(response.result.rawLogs)
const events = rawLogs[0].events as Event[]
const events = rawLogs.map((log: any) => log.events).flat() as Event[]
let tokensOutValue = '0'
events.forEach((event: Event) => {
const attributes = event.attributes