Skip to content

Commit

Permalink
Merge branch 'develop' into preview
Browse files Browse the repository at this point in the history
  • Loading branch information
NguyenHuy1812 committed Jun 5, 2024
2 parents 26073fa + a8fe15f commit 572dd89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
22 changes: 4 additions & 18 deletions src/commands/balances/index/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,27 +366,13 @@ async function getTxns(
),
)
.map((d: any) => {
const date = d.signed_at
const firstAction = d.actions?.find(
(a: any) => a.native_transfer || a.name === "Transfer",
)
if (!firstAction) return
if (isValidRoninAddress(address)) {
address = `0x${address.slice(6)}`
}
const target = firstAction.to
const action =
target.toLowerCase() === address.toLowerCase() ? "Received" : "Sent"
const amount = formatTokenDigit(firstAction.amount)
const token = firstAction.unit

return {
date,
action,
target,
amount,
token,
}
d.actions?.forEach((action: any) => {
action.amount = formatTokenDigit(action.amount)
})
return d
})
.filter(Boolean)
.slice(0, 5)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const VALID_BOOST_MESSAGE_TYPES = [
]

// usd
export const MIN_DUST = 0.001
export const MIN_DUST = 3

export const HOMEPAGE_URL = process.env.HOMEPAGE_URL || "https://mochi.gg"
export const MOCHI_DOC_URL = "https://docs.mochi.gg"
Expand Down

0 comments on commit 572dd89

Please sign in to comment.