refactor: update currency symbols in feed
This commit is contained in:
parent
09d0f02d84
commit
98298c4367
@ -486,6 +486,9 @@ importers:
|
||||
dotenv:
|
||||
specifier: ^16.3.1
|
||||
version: 16.3.1
|
||||
easy-currency-symbol:
|
||||
specifier: ^1.0.1
|
||||
version: 1.0.1
|
||||
express:
|
||||
specifier: ^4.18.2
|
||||
version: 4.18.2
|
||||
@ -6204,6 +6207,9 @@ packages:
|
||||
eastasianwidth@0.2.0:
|
||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||
|
||||
easy-currency-symbol@1.0.1:
|
||||
resolution: {integrity: sha512-M8ugWXSnV5utVTJd4uLOsXqg/sv8Ca7yrDvbSy01mQ52u2XxNnoJ0+tenh3gYCvcceRRLkG/AzIVP/rdjKGuAg==}
|
||||
|
||||
ecdsa-sig-formatter@1.0.11:
|
||||
resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==}
|
||||
|
||||
@ -10321,6 +10327,7 @@ packages:
|
||||
|
||||
react-beautiful-dnd@13.1.1:
|
||||
resolution: {integrity: sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==}
|
||||
deprecated: 'react-beautiful-dnd is now deprecated. Context and options: https://github.com/atlassian/react-beautiful-dnd/issues/2672'
|
||||
peerDependencies:
|
||||
react: ^16.8.5 || ^17.0.0 || ^18.0.0
|
||||
react-dom: ^16.8.5 || ^17.0.0 || ^18.0.0
|
||||
@ -20325,6 +20332,8 @@ snapshots:
|
||||
|
||||
eastasianwidth@0.2.0: {}
|
||||
|
||||
easy-currency-symbol@1.0.1: {}
|
||||
|
||||
ecdsa-sig-formatter@1.0.11:
|
||||
dependencies:
|
||||
safe-buffer: 5.2.1
|
||||
|
@ -42,6 +42,7 @@
|
||||
"dayjs": "^1.11.9",
|
||||
"detect-browser": "^5.3.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"easy-currency-symbol": "^1.0.1",
|
||||
"express": "^4.18.2",
|
||||
"express-async-errors": "^3.1.1",
|
||||
"express-validator": "^7.0.1",
|
||||
|
@ -8,6 +8,7 @@ import { tencentCloudAlarmSchema } from '../../../model/_schema/feed.js';
|
||||
import { logger } from '../../../utils/logger.js';
|
||||
import { compact, fromPairs, get, map, uniqueId } from 'lodash-es';
|
||||
import { subscribeEventBus } from '../../../ws/shared.js';
|
||||
import { currencyToSymbol } from 'easy-currency-symbol';
|
||||
|
||||
export const feedIntegrationRouter = router({
|
||||
playground: publicProcedure
|
||||
@ -232,7 +233,7 @@ export const feedIntegrationRouter = router({
|
||||
await createFeedEvent(workspaceId, {
|
||||
channelId: channelId,
|
||||
eventName: type,
|
||||
eventContent: `You receive a payment of ${currency} **${amount}**`,
|
||||
eventContent: `You receive a payment of ${currencyToSymbol(currency)}**${amount}**`,
|
||||
tags: [],
|
||||
source: 'stripe',
|
||||
senderId: eventId,
|
||||
@ -252,7 +253,7 @@ export const feedIntegrationRouter = router({
|
||||
await createFeedEvent(workspaceId, {
|
||||
channelId: channelId,
|
||||
eventName: type,
|
||||
eventContent: `A payment has been canceled of ${currency} **${amount}**`,
|
||||
eventContent: `A payment has been canceled of ${currencyToSymbol(currency)}**${amount}**`,
|
||||
tags: [],
|
||||
source: 'stripe',
|
||||
senderId: eventId,
|
||||
|
Loading…
Reference in New Issue
Block a user