Skip to content

Commit

Permalink
Merge branch 'preview'
Browse files Browse the repository at this point in the history
  • Loading branch information
NguyenHuy1812 committed Jun 5, 2024
2 parents 55652d6 + dbddc65 commit a61b3e3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [6.52.1-rc.2](https://github.com/consolelabs/mochi-discord/compare/v6.52.1-rc.1...v6.52.1-rc.2) (2024-06-05)


### Bug Fixes

* **balance:** filter spam tx when render onchain bal ([#1686](https://github.com/consolelabs/mochi-discord/issues/1686)) ([121f527](https://github.com/consolelabs/mochi-discord/commit/121f527b93fe442415985e61ad1c64197d14166c))

## [6.52.1-rc.1](https://github.com/consolelabs/mochi-discord/compare/v6.52.0...v6.52.1-rc.1) (2024-06-05)


### Bug Fixes

* **balances:** render recent tx for onchain bals ([#1685](https://github.com/consolelabs/mochi-discord/issues/1685)) ([a8fe15f](https://github.com/consolelabs/mochi-discord/commit/a8fe15fd0c303e4ea2ea8892347856c5c8b3ead7))

# [6.52.0](https://github.com/consolelabs/mochi-discord/compare/v6.51.0...v6.52.0) (2024-06-04)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,5 @@
"node": "18.x"
},
"name": "mochi-discord",
"version": "6.52.0"
"version": "6.52.1-rc.2"
}
27 changes: 8 additions & 19 deletions src/commands/balances/index/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,31 +362,20 @@ async function getTxns(
d.successful &&
d.actions?.some(
(a: any) =>
a.native_transfer || equalIgnoreCase(a.name, "Transfer"),
a.native_transfer ||
(equalIgnoreCase(a.name, "Transfer") &&
a.unit?.length >= 3 &&
a.unit?.length <= 6),
),
)
.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 a61b3e3

Please sign in to comment.