@stellar-expert/tx-meta-effects-parser 6.1.1 → 6.3.0

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/README.MD CHANGED
@@ -1506,7 +1506,12 @@ ClaimClaimableBalanceOp</sub></td>
1506
1506
  write_code_byte: 0,
1507
1507
  write_data_byte: 1028,
1508
1508
  write_entry: 5,
1509
- write_key_byte: 0
1509
+ write_key_byte: 0,
1510
+ fee: {
1511
+ nonrefundable: 284210,
1512
+ refundable: 100521,
1513
+ rent: 100481
1514
+ }
1510
1515
  }
1511
1516
  ```
1512
1517
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/tx-meta-effects-parser",
3
- "version": "6.1.1",
3
+ "version": "6.3.0",
4
4
  "description": "Low-level effects parser for Stellar transaction results and meta XDR",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  "author": "team@stellar.expert",
10
10
  "license": "MIT",
11
11
  "peerDependencies": {
12
- "@stellar/stellar-base": "^12.1.0"
12
+ "@stellar/stellar-base": "^13.0.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@babel/core": "^7.22.9",
@@ -213,9 +213,9 @@ class EffectsAnalyzer {
213
213
  if (sorobanExt) {
214
214
  const attrs = sorobanExt._attributes
215
215
  const fee = {
216
- nonrefundable: parseLargeInt(attrs.totalNonRefundableResourceFeeCharged),
217
- refundable: parseLargeInt(attrs.totalRefundableResourceFeeCharged),
218
- rent: parseLargeInt(attrs.rentFeeCharged)
216
+ nonrefundable: parseInt(parseLargeInt(attrs.totalNonRefundableResourceFeeCharged)),
217
+ refundable: parseInt(parseLargeInt(attrs.totalRefundableResourceFeeCharged)),
218
+ rent: parseInt(parseLargeInt(attrs.rentFeeCharged))
219
219
  }
220
220
  this.addMetric(this.retrieveOpContractId(), 'fee', fee)
221
221
  }
@@ -1105,6 +1105,10 @@ function validateAmount(amount) {
1105
1105
  return amount
1106
1106
  }
1107
1107
 
1108
+ /**
1109
+ * @param largeInt
1110
+ * @return {String}
1111
+ */
1108
1112
  function parseLargeInt(largeInt) {
1109
1113
  return largeInt._value.toString()
1110
1114
  }