payment-kit 1.19.16 → 1.19.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/src/routes/meter-events.ts +2 -1
- package/blocklet.yml +1 -1
- package/package.json +4 -4
|
@@ -238,6 +238,7 @@ router.post('/', auth, async (req, res) => {
|
|
|
238
238
|
|
|
239
239
|
const timestamp = req.body.timestamp || req.body.payload.timestamp || Math.floor(Date.now() / 1000);
|
|
240
240
|
|
|
241
|
+
const value = parseFloat(req.body.payload.value).toFixed(paymentCurrency.decimal);
|
|
241
242
|
const eventData = {
|
|
242
243
|
event_name: req.body.event_name,
|
|
243
244
|
payload: {
|
|
@@ -246,7 +247,7 @@ router.post('/', auth, async (req, res) => {
|
|
|
246
247
|
decimal: paymentCurrency.decimal,
|
|
247
248
|
unit: paymentCurrency.name,
|
|
248
249
|
subscription_id: req.body.payload.subscription_id,
|
|
249
|
-
value: fromTokenToUnit(
|
|
250
|
+
value: fromTokenToUnit(value, paymentCurrency.decimal).toString(),
|
|
250
251
|
},
|
|
251
252
|
identifier: req.body.identifier,
|
|
252
253
|
livemode: !!req.livemode,
|
package/blocklet.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payment-kit",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.17",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "blocklet dev --open",
|
|
6
6
|
"lint": "tsc --noEmit && eslint src api/src --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@blocklet/error": "^0.2.5",
|
|
56
56
|
"@blocklet/js-sdk": "^1.16.48",
|
|
57
57
|
"@blocklet/logger": "^1.16.48",
|
|
58
|
-
"@blocklet/payment-react": "1.19.
|
|
58
|
+
"@blocklet/payment-react": "1.19.17",
|
|
59
59
|
"@blocklet/sdk": "^1.16.48",
|
|
60
60
|
"@blocklet/ui-react": "^3.1.5",
|
|
61
61
|
"@blocklet/uploader": "^0.2.7",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"@abtnode/types": "^1.16.48",
|
|
126
126
|
"@arcblock/eslint-config-ts": "^0.3.3",
|
|
127
|
-
"@blocklet/payment-types": "1.19.
|
|
127
|
+
"@blocklet/payment-types": "1.19.17",
|
|
128
128
|
"@types/cookie-parser": "^1.4.9",
|
|
129
129
|
"@types/cors": "^2.8.19",
|
|
130
130
|
"@types/debug": "^4.1.12",
|
|
@@ -170,5 +170,5 @@
|
|
|
170
170
|
"parser": "typescript"
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
|
-
"gitHead": "
|
|
173
|
+
"gitHead": "718d307a13b0c11e11316cdd28fff2f335e23de7"
|
|
174
174
|
}
|