Skip to content

Commit

Permalink
Merge branch 'develop' into mochi-web-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanddd committed Apr 9, 2024
2 parents f3ce5fa + c15d6b7 commit fd6b3ca
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
7 changes: 5 additions & 2 deletions apps/mochi-web/components/Receipt/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import UI, { Platform, utils as mochiUtils } from '@consolelabs/mochi-formatter'
import { coinIcon, discordLogo, telegramLogo, xlogo } from '~utils/image'
import { utils } from 'ethers'
import { api } from '~constants/mochi'
import { HOME_URL } from '~envs'
import { truncate } from '@dwarvesf/react-utils'
import { formatTokenDigit } from '~utils/string'
import { templates, type TemplateName } from './Template'
Expand Down Expand Up @@ -125,10 +124,14 @@ export async function transformData(rawData: any) {
break
}

const { data: emoji } = await api.base.metadata.getEmojis({
codes: [rawData?.token.symbol],
})

const ogDataOnly = {
from: (sender?.plain ?? '') as any,
native: rawData?.token.native,
tokenIcon: rawData.token.icon || `${HOME_URL}/assets/coin.png`,
tokenIcon: rawData.token.icon || emoji?.[0]?.emoji_url || coinIcon.src,
to: (receiver?.plain ?? '') as any,
symbol: rawData?.token.symbol,
amount: mochiUtils.formatTokenDigit({
Expand Down
6 changes: 6 additions & 0 deletions packages/web3/login-widget/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @mochi-web3/login-widget

## 0.2.18

### Patch Changes

- [#828](https://github.com/consolelabs/mochi-ui/pull/828) [`c099260`](https://github.com/consolelabs/mochi-ui/commit/c0992604766e14c1c56c07612da75ae916fbc450) Thanks [@tuanddd](https://github.com/tuanddd)! - Export ChainProvider via login-widget

## 0.2.17

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/login-widget/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mochi-web3/login-widget",
"version": "0.2.17",
"version": "0.2.18",
"sideEffects": false,
"main": "src/index.ts",
"files": [
Expand Down
1 change: 1 addition & 0 deletions packages/web3/login-widget/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { type ChainProvider } from '@mochi-web3/connect-wallet-widget'
export {
LoginWidgetProvider,
LoginWidget,
Expand Down

0 comments on commit fd6b3ca

Please sign in to comment.