@firmachain/firma-js 0.3.3 → 0.3.5

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.
Files changed (245) hide show
  1. package/dist/index.js +5 -1
  2. package/dist/sdk/FirmaAuthzService.d.ts +8 -7
  3. package/dist/sdk/FirmaAuthzService.js +12 -22
  4. package/dist/sdk/FirmaBankService.js +2 -2
  5. package/dist/sdk/FirmaChainService.js +1 -1
  6. package/dist/sdk/FirmaContractService.d.ts +1 -1
  7. package/dist/sdk/FirmaContractService.js +6 -6
  8. package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
  9. package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
  10. package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
  11. package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
  12. package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
  13. package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
  14. package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
  15. package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
  16. package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
  17. package/dist/sdk/FirmaCosmWasmService.js +13 -13
  18. package/dist/sdk/FirmaDistributionService.d.ts +1 -1
  19. package/dist/sdk/FirmaDistributionService.js +6 -6
  20. package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
  21. package/dist/sdk/FirmaFeeGrantService.js +9 -26
  22. package/dist/sdk/FirmaGovService.d.ts +1 -1
  23. package/dist/sdk/FirmaGovService.js +14 -14
  24. package/dist/sdk/FirmaIbcService.d.ts +3 -3
  25. package/dist/sdk/FirmaIbcService.js +11 -8
  26. package/dist/sdk/FirmaIpfsService.js +1 -1
  27. package/dist/sdk/FirmaMintService.js +1 -1
  28. package/dist/sdk/FirmaNftService.d.ts +1 -1
  29. package/dist/sdk/FirmaNftService.js +6 -6
  30. package/dist/sdk/FirmaSlashingService.js +1 -1
  31. package/dist/sdk/FirmaStakingService.d.ts +3 -3
  32. package/dist/sdk/FirmaStakingService.js +6 -6
  33. package/dist/sdk/FirmaTokenService.d.ts +1 -1
  34. package/dist/sdk/FirmaTokenService.js +5 -5
  35. package/dist/sdk/FirmaUtil.d.ts +25 -24
  36. package/dist/sdk/FirmaUtil.js +200 -145
  37. package/dist/sdk/FirmaWalletService.d.ts +6 -7
  38. package/dist/sdk/FirmaWalletService.js +78 -36
  39. package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
  40. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
  41. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
  42. package/dist/sdk/firmachain/authz/index.js +5 -1
  43. package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
  44. package/dist/sdk/firmachain/bank/index.js +5 -1
  45. package/dist/sdk/firmachain/common/ITxClient.d.ts +2 -4
  46. package/dist/sdk/firmachain/common/ITxClient.js +20 -92
  47. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
  48. package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
  49. package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
  50. package/dist/sdk/firmachain/common/TxCommon.d.ts +13 -29
  51. package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
  52. package/dist/sdk/firmachain/common/accounts.js +7 -7
  53. package/dist/sdk/firmachain/{amino → common}/coins.d.ts +2 -14
  54. package/dist/sdk/firmachain/{amino → common}/coins.js +4 -25
  55. package/dist/sdk/firmachain/common/index.d.ts +0 -1
  56. package/dist/sdk/firmachain/common/index.js +5 -4
  57. package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
  58. package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
  59. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
  60. package/dist/sdk/firmachain/contract/index.js +5 -1
  61. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
  62. package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
  63. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
  64. package/dist/sdk/firmachain/distribution/index.js +5 -1
  65. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
  66. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
  67. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
  68. package/dist/sdk/firmachain/feegrant/index.js +5 -1
  69. package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
  70. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
  71. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
  72. package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
  73. package/dist/sdk/firmachain/gov/index.js +5 -1
  74. package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
  75. package/dist/sdk/firmachain/ibc/index.js +5 -1
  76. package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
  77. package/dist/sdk/firmachain/mint/index.js +5 -1
  78. package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
  79. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
  80. package/dist/sdk/firmachain/nft/index.js +5 -1
  81. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
  82. package/dist/sdk/firmachain/slashing/index.js +5 -1
  83. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
  84. package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
  85. package/dist/sdk/firmachain/staking/index.js +5 -1
  86. package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
  87. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
  88. package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
  89. package/dist/sdk/firmachain/token/index.js +5 -1
  90. package/dist/test/00.wallet.test.js +4 -4
  91. package/dist/test/01.contract_tx.test.js +5 -5
  92. package/dist/test/02.contract_query.test.js +15 -15
  93. package/dist/test/03.contract_scenario.test.js +28 -28
  94. package/dist/test/04.bank_tx.test.js +4 -4
  95. package/dist/test/05.bank_query.test.js +9 -9
  96. package/dist/test/06.feegrant_tx.test.js +59 -35
  97. package/dist/test/07.feegrant_query.test.js +18 -15
  98. package/dist/test/08.gas_estimate.test.js +110 -70
  99. package/dist/test/09.ipfs.test.js +4 -4
  100. package/dist/test/10.nft_tx.test.js +7 -7
  101. package/dist/test/11.nft_query.test.js +9 -9
  102. package/dist/test/12.staking_tx.test.js +27 -15
  103. package/dist/test/13.staking_query.test.js +20 -20
  104. package/dist/test/14.distribution_tx.test.js +8 -8
  105. package/dist/test/15.distribution_query.test.js +15 -15
  106. package/dist/test/16.gov_tx.test.js +17 -17
  107. package/dist/test/17.gov_query.test.js +19 -19
  108. package/dist/test/18.util.test.js +105 -63
  109. package/dist/test/19.chain.test.js +38 -38
  110. package/dist/test/20.slashing_query.test.js +25 -25
  111. package/dist/test/21.token_tx.test.js +6 -6
  112. package/dist/test/22.token_query.test.js +4 -4
  113. package/dist/test/23.authz_tx.test.js +77 -47
  114. package/dist/test/24.authz_query.test.js +66 -67
  115. package/dist/test/25.cosmwasm_tx.test.js +7 -7
  116. package/dist/test/26.cosmwasm_query.test.js +127 -59
  117. package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +34 -62
  118. package/dist/test/28.ibc_tx.test.js +8 -8
  119. package/dist/test/29.mint_query.test.js +2 -2
  120. package/dist/test/30.cw20_tx.test.js +20 -20
  121. package/dist/test/31.cw20_query.test.js +24 -24
  122. package/dist/test/32.cw721_tx.test.js +19 -19
  123. package/dist/test/33.cw721_query.test.js +32 -32
  124. package/dist/test/34.cw_bridge_tx.test.js +19 -19
  125. package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
  126. package/dist/test/36.cw_bridge_query.test.js +20 -20
  127. package/dist/test/37.cw_marketplace_tx.test.js +32 -32
  128. package/dist/test/38.cw_marketplace_query.test.js +2 -2
  129. package/dist/test/config_test.d.ts +1 -1
  130. package/dist/test/config_test.js +2 -2
  131. package/package.json +9 -10
  132. package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
  133. package/dist/sdk/firmachain/amino/addresses.js +0 -46
  134. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
  135. package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
  136. package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
  137. package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
  138. package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
  139. package/dist/sdk/firmachain/amino/encoding.js +0 -252
  140. package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
  141. package/dist/sdk/firmachain/amino/multisig.js +0 -42
  142. package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
  143. package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
  144. package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
  145. package/dist/sdk/firmachain/amino/signature.js +0 -36
  146. package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
  147. package/dist/sdk/firmachain/amino/signdoc.js +0 -68
  148. package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
  149. package/dist/sdk/firmachain/amino/signer.js +0 -2
  150. package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
  151. package/dist/sdk/firmachain/amino/stdtx.js +0 -17
  152. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
  153. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
  154. package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
  155. package/dist/sdk/firmachain/common/aminotypes.js +0 -74
  156. package/dist/sdk/firmachain/common/events.d.ts +0 -32
  157. package/dist/sdk/firmachain/common/events.js +0 -18
  158. package/dist/sdk/firmachain/common/fee.d.ts +0 -26
  159. package/dist/sdk/firmachain/common/fee.js +0 -83
  160. package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
  161. package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
  162. package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
  163. package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
  164. package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
  165. package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
  166. package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
  167. package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
  168. package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
  169. package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
  170. package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
  171. package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
  172. package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
  173. package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
  174. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
  175. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
  176. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
  177. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
  178. package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
  179. package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
  180. package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
  181. package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
  182. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
  183. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
  184. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
  185. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
  186. package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
  187. package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
  188. package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
  189. package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
  190. package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
  191. package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
  192. package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
  193. package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
  194. package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
  195. package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
  196. package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
  197. package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
  198. package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
  199. package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
  200. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
  201. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
  202. package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
  203. package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
  204. package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
  205. package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
  206. package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
  207. package/dist/sdk/firmachain/common/modules/index.js +0 -101
  208. package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
  209. package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
  210. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
  211. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
  212. package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
  213. package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
  214. package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
  215. package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
  216. package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
  217. package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
  218. package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
  219. package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
  220. package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
  221. package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
  222. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
  223. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
  224. package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
  225. package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
  226. package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
  227. package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
  228. package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
  229. package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
  230. package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
  231. package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
  232. package/dist/sdk/firmachain/common/search.d.ts +0 -10
  233. package/dist/sdk/firmachain/common/search.js +0 -7
  234. package/dist/sdk/firmachain/common/signing.d.ts +0 -15
  235. package/dist/sdk/firmachain/common/signing.js +0 -87
  236. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +0 -121
  237. package/dist/sdk/firmachain/common/signingstargateclient.js +0 -674
  238. package/dist/sdk/firmachain/common/stargateclient.d.ts +0 -210
  239. package/dist/sdk/firmachain/common/stargateclient.js +0 -527
  240. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
  241. package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
  242. /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
  243. /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
  244. /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
  245. /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -76,7 +76,7 @@ describe('[12. Staking Tx Test]', function () {
76
76
  return [4 /*yield*/, firma.Staking.delegate(aliceWallet, valOperAddress, amountFCT)];
77
77
  case 1:
78
78
  result = _a.sent();
79
- chai_1.expect(result.code).to.equal(0);
79
+ (0, chai_1.expect)(result.code).to.equal(0);
80
80
  return [2 /*return*/];
81
81
  }
82
82
  });
@@ -96,13 +96,13 @@ describe('[12. Staking Tx Test]', function () {
96
96
  return [4 /*yield*/, firma.Staking.undelegate(aliceWallet, valOperAddress, amountFCT, { gas: gas, fee: fee })];
97
97
  case 2:
98
98
  result = _a.sent();
99
- chai_1.expect(result.code).to.equal(0);
99
+ (0, chai_1.expect)(result.code).to.equal(0);
100
100
  return [2 /*return*/];
101
101
  }
102
102
  });
103
103
  }); });
104
104
  it('redelegate OK', function () { return __awaiter(void 0, void 0, void 0, function () {
105
- var validatorList, srcValoperAddress, dstValoperAddress, amount, result, result1;
105
+ var validatorList, srcValoperAddress, dstValoperAddress, amount, result, gas, fee, result1, error_1;
106
106
  return __generator(this, function (_a) {
107
107
  switch (_a.label) {
108
108
  case 0: return [4 /*yield*/, firma.Staking.getValidatorList()];
@@ -116,18 +116,30 @@ describe('[12. Staking Tx Test]', function () {
116
116
  return [4 /*yield*/, firma.Staking.delegate(aliceWallet, srcValoperAddress, amount)];
117
117
  case 2:
118
118
  result = _a.sent();
119
- chai_1.expect(result.code).to.equal(0);
120
- return [4 /*yield*/, firma.Staking.redelegate(aliceWallet, srcValoperAddress, dstValoperAddress, amount, { gas: 300000, fee: 30000 })];
119
+ (0, chai_1.expect)(result.code).to.equal(0);
120
+ _a.label = 3;
121
121
  case 3:
122
+ _a.trys.push([3, 6, , 7]);
123
+ return [4 /*yield*/, firma.Staking.getGasEstimationRedelegate(aliceWallet, srcValoperAddress, dstValoperAddress, amount)];
124
+ case 4:
125
+ gas = _a.sent();
126
+ fee = Math.ceil(gas * 0.1);
127
+ return [4 /*yield*/, firma.Staking.redelegate(aliceWallet, srcValoperAddress, dstValoperAddress, amount, { gas: gas, fee: fee })];
128
+ case 5:
122
129
  result1 = _a.sent();
123
- chai_1.expect(result1.code).to.equal(0);
124
- return [2 /*return*/];
130
+ (0, chai_1.expect)(result1.code).to.equal(0);
131
+ return [3 /*break*/, 7];
132
+ case 6:
133
+ error_1 = _a.sent();
134
+ console.log(error_1);
135
+ return [3 /*break*/, 7];
136
+ case 7: return [2 /*return*/];
125
137
  }
126
138
  });
127
139
  }); });
128
140
  // new case added. if succeed, the dapp needs to prevent zero amount input from users.
129
141
  it('staking send Fail - send zero money', function () { return __awaiter(void 0, void 0, void 0, function () {
130
- var aliceWallet, amount, result, error_1;
142
+ var aliceWallet, amount, result, error_2;
131
143
  return __generator(this, function (_a) {
132
144
  switch (_a.label) {
133
145
  case 0: return [4 /*yield*/, firma.Wallet.fromMnemonic(config_test_1.aliceMnemonic)];
@@ -140,11 +152,11 @@ describe('[12. Staking Tx Test]', function () {
140
152
  return [4 /*yield*/, firma.Staking.delegate(aliceWallet, valOperAddress, amount)];
141
153
  case 3:
142
154
  result = _a.sent();
143
- chai_1.expect(result.code).to.equal(5);
155
+ (0, chai_1.expect)(result.code).to.equal(5);
144
156
  return [3 /*break*/, 5];
145
157
  case 4:
146
- error_1 = _a.sent();
147
- chai_1.expect(false).to.not.equal(true);
158
+ error_2 = _a.sent();
159
+ (0, chai_1.expect)(false).to.not.equal(true);
148
160
  return [3 /*break*/, 5];
149
161
  case 5: return [2 /*return*/];
150
162
  }
@@ -159,14 +171,14 @@ describe('[12. Staking Tx Test]', function () {
159
171
  return [4 /*yield*/, firma.Staking.delegate(aliceWallet, valOperAddress, amount)];
160
172
  case 1:
161
173
  result = _a.sent();
162
- chai_1.expect(result.code).to.equal(5);
174
+ (0, chai_1.expect)(result.code).to.equal(5);
163
175
  return [2 /*return*/];
164
176
  }
165
177
  });
166
178
  }); });
167
179
  // NOTICE: not decide to include firma.js spec
168
180
  // This unit test can be run once and can be re-invoked after 24 hours.
169
- it.skip('editValidator OK', function () { return __awaiter(void 0, void 0, void 0, function () {
181
+ it('editValidator OK', function () { return __awaiter(void 0, void 0, void 0, function () {
170
182
  var inputPercentage, fixed, count, number, per, per1, fianlper, commissionRate, minSelfDelegation, description, result;
171
183
  return __generator(this, function (_a) {
172
184
  switch (_a.label) {
@@ -191,7 +203,7 @@ describe('[12. Staking Tx Test]', function () {
191
203
  return [4 /*yield*/, firma.Staking.editValidator(validatorWallet, valOperAddress, description, commissionRate, minSelfDelegation)];
192
204
  case 1:
193
205
  result = _a.sent();
194
- chai_1.expect(result.code).to.equal(0);
206
+ (0, chai_1.expect)(result.code).to.equal(0);
195
207
  return [2 /*return*/];
196
208
  }
197
209
  });
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -52,7 +52,7 @@ describe('[13. Staking Query Test]', function () {
52
52
  case 0: return [4 /*yield*/, firma.Staking.getValidatorList()];
53
53
  case 1:
54
54
  result = _a.sent();
55
- chai_1.expect(result.dataList.length > 0).to.be.equal(true);
55
+ (0, chai_1.expect)(result.dataList.length > 0).to.be.equal(true);
56
56
  return [2 /*return*/];
57
57
  }
58
58
  });
@@ -67,7 +67,7 @@ describe('[13. Staking Query Test]', function () {
67
67
  return [4 /*yield*/, firma.Staking.getValidator(validatorList[0].operator_address)];
68
68
  case 2:
69
69
  result = _a.sent();
70
- chai_1.expect(FirmaUtil_1.FirmaUtil.isValidAddress(result.operator_address)).to.be.equal(true);
70
+ (0, chai_1.expect)(FirmaUtil_1.FirmaUtil.isValidAddress(result.operator_address)).to.be.equal(true);
71
71
  return [2 /*return*/];
72
72
  }
73
73
  });
@@ -83,10 +83,10 @@ describe('[13. Staking Query Test]', function () {
83
83
  case 2:
84
84
  result = _a.sent();
85
85
  if (result.dataList.length > 0) {
86
- chai_1.expect(result.dataList[0].balance).to.not.equal("");
86
+ (0, chai_1.expect)(result.dataList[0].balance).to.not.equal("");
87
87
  }
88
88
  else {
89
- chai_1.expect(true).to.be.equal(true);
89
+ (0, chai_1.expect)(true).to.be.equal(true);
90
90
  }
91
91
  return [2 /*return*/];
92
92
  }
@@ -103,10 +103,10 @@ describe('[13. Staking Query Test]', function () {
103
103
  case 2:
104
104
  result = _a.sent();
105
105
  if (result.dataList.length > 0) {
106
- chai_1.expect(FirmaUtil_1.FirmaUtil.isValidAddress(result.dataList[0].delegator_address)).to.be.equal(true);
106
+ (0, chai_1.expect)(FirmaUtil_1.FirmaUtil.isValidAddress(result.dataList[0].delegator_address)).to.be.equal(true);
107
107
  }
108
108
  else {
109
- chai_1.expect(true).to.be.equal(true);
109
+ (0, chai_1.expect)(true).to.be.equal(true);
110
110
  }
111
111
  return [2 /*return*/];
112
112
  }
@@ -120,7 +120,7 @@ describe('[13. Staking Query Test]', function () {
120
120
  case 0: return [4 /*yield*/, firma.Staking.getPool()];
121
121
  case 1:
122
122
  result = _a.sent();
123
- chai_1.expect(result.bonded_tokens).to.not.equal("");
123
+ (0, chai_1.expect)(result.bonded_tokens).to.not.equal("");
124
124
  return [2 /*return*/];
125
125
  }
126
126
  });
@@ -132,7 +132,7 @@ describe('[13. Staking Query Test]', function () {
132
132
  case 0: return [4 /*yield*/, firma.Staking.getParams()];
133
133
  case 1:
134
134
  result = _a.sent();
135
- chai_1.expect(result.max_validators).to.not.equal(0);
135
+ (0, chai_1.expect)(result.max_validators).to.not.equal(0);
136
136
  return [2 /*return*/];
137
137
  }
138
138
  });
@@ -144,7 +144,7 @@ describe('[13. Staking Query Test]', function () {
144
144
  case 0: return [4 /*yield*/, firma.Staking.getParamsAsStakingParams()];
145
145
  case 1:
146
146
  result = _a.sent();
147
- chai_1.expect(result.maxValidators).to.not.equal(0);
147
+ (0, chai_1.expect)(result.maxValidators).to.not.equal(0);
148
148
  return [2 /*return*/];
149
149
  }
150
150
  });
@@ -163,10 +163,10 @@ describe('[13. Staking Query Test]', function () {
163
163
  case 3:
164
164
  result = _c.sent();
165
165
  if (result.dataList.length > 0) {
166
- chai_1.expect(result.dataList[0].balance).to.not.equal("");
166
+ (0, chai_1.expect)(result.dataList[0].balance).to.not.equal("");
167
167
  }
168
168
  else {
169
- chai_1.expect(true).to.be.equal(true);
169
+ (0, chai_1.expect)(true).to.be.equal(true);
170
170
  }
171
171
  return [2 /*return*/];
172
172
  }
@@ -185,10 +185,10 @@ describe('[13. Staking Query Test]', function () {
185
185
  case 3:
186
186
  result = _c.sent();
187
187
  if (result.length > 0) {
188
- chai_1.expect(FirmaUtil_1.FirmaUtil.isValidAddress(result[0].redelegation.delegator_address)).to.be.equal(true);
188
+ (0, chai_1.expect)(FirmaUtil_1.FirmaUtil.isValidAddress(result[0].redelegation.delegator_address)).to.be.equal(true);
189
189
  }
190
190
  else {
191
- chai_1.expect(true).to.be.equal(true);
191
+ (0, chai_1.expect)(true).to.be.equal(true);
192
192
  }
193
193
  return [2 /*return*/];
194
194
  }
@@ -207,10 +207,10 @@ describe('[13. Staking Query Test]', function () {
207
207
  case 3:
208
208
  result = _c.sent();
209
209
  if (result.length > 0) {
210
- chai_1.expect(FirmaUtil_1.FirmaUtil.isValidAddress(result[0].delegator_address)).to.be.equal(true);
210
+ (0, chai_1.expect)(FirmaUtil_1.FirmaUtil.isValidAddress(result[0].delegator_address)).to.be.equal(true);
211
211
  }
212
212
  else {
213
- chai_1.expect(true).to.be.equal(true);
213
+ (0, chai_1.expect)(true).to.be.equal(true);
214
214
  }
215
215
  return [2 /*return*/];
216
216
  }
@@ -234,11 +234,11 @@ describe('[13. Staking Query Test]', function () {
234
234
  case 4: return [4 /*yield*/, _b.apply(_a, [_c.sent(), validatorList[0].operator_address])];
235
235
  case 5:
236
236
  result = _c.sent();
237
- chai_1.expect(result.balance).to.not.equal("");
237
+ (0, chai_1.expect)(result.balance).to.not.equal("");
238
238
  return [3 /*break*/, 7];
239
239
  case 6:
240
240
  error_1 = _c.sent();
241
- chai_1.expect(false).to.not.equal(true);
241
+ (0, chai_1.expect)(false).to.not.equal(true);
242
242
  return [3 /*break*/, 7];
243
243
  case 7: return [2 /*return*/];
244
244
  }
@@ -262,11 +262,11 @@ describe('[13. Staking Query Test]', function () {
262
262
  case 4: return [4 /*yield*/, _b.apply(_a, [_c.sent(), validatorList[0].operator_address])];
263
263
  case 5:
264
264
  result = _c.sent();
265
- chai_1.expect(FirmaUtil_1.FirmaUtil.isValidAddress(result.delegator_address)).to.be.equal(true);
265
+ (0, chai_1.expect)(FirmaUtil_1.FirmaUtil.isValidAddress(result.delegator_address)).to.be.equal(true);
266
266
  return [3 /*break*/, 7];
267
267
  case 6:
268
268
  error_2 = _c.sent();
269
- chai_1.expect(false).to.not.equal(true);
269
+ (0, chai_1.expect)(false).to.not.equal(true);
270
270
  return [3 /*break*/, 7];
271
271
  case 7: return [2 /*return*/];
272
272
  }
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -90,7 +90,7 @@ describe('[14. Distribution Tx Test]', function () {
90
90
  return [4 /*yield*/, firma.Distribution.withdrawAllRewards(aliceWallet, validatorAddress)];
91
91
  case 2:
92
92
  result = _a.sent();
93
- chai_1.expect(result.code).to.equal(0);
93
+ (0, chai_1.expect)(result.code).to.equal(0);
94
94
  return [2 /*return*/];
95
95
  }
96
96
  });
@@ -108,7 +108,7 @@ describe('[14. Distribution Tx Test]', function () {
108
108
  return [4 /*yield*/, firma.Distribution.withdrawAllRewardsFromAllValidator(aliceWallet, delegationList, { gas: gasEstimation, fee: gasEstimation })];
109
109
  case 3:
110
110
  result = _a.sent();
111
- chai_1.expect(result.code).to.equal(0);
111
+ (0, chai_1.expect)(result.code).to.equal(0);
112
112
  return [2 /*return*/];
113
113
  }
114
114
  });
@@ -120,7 +120,7 @@ describe('[14. Distribution Tx Test]', function () {
120
120
  case 0: return [4 /*yield*/, firma.Distribution.withdrawAllRewards(validatorWallet, valOperAddress)];
121
121
  case 1:
122
122
  result = _a.sent();
123
- chai_1.expect(result.code).to.equal(0);
123
+ (0, chai_1.expect)(result.code).to.equal(0);
124
124
  return [2 /*return*/];
125
125
  }
126
126
  });
@@ -132,7 +132,7 @@ describe('[14. Distribution Tx Test]', function () {
132
132
  case 0: return [4 /*yield*/, firma.Distribution.withdrawValidatorCommission(validatorWallet, valOperAddress)];
133
133
  case 1:
134
134
  result = _a.sent();
135
- chai_1.expect(result.code).to.equal(0);
135
+ (0, chai_1.expect)(result.code).to.equal(0);
136
136
  return [2 /*return*/];
137
137
  }
138
138
  });
@@ -146,7 +146,7 @@ describe('[14. Distribution Tx Test]', function () {
146
146
  return [4 /*yield*/, firma.Distribution.fundCommunityPool(aliceWallet, amount)];
147
147
  case 1:
148
148
  result = _a.sent();
149
- chai_1.expect(result.code).to.equal(0);
149
+ (0, chai_1.expect)(result.code).to.equal(0);
150
150
  return [2 /*return*/];
151
151
  }
152
152
  });
@@ -158,11 +158,11 @@ describe('[14. Distribution Tx Test]', function () {
158
158
  case 0: return [4 /*yield*/, firma.Distribution.setWithdrawAddress(aliceWallet, bobAddress)];
159
159
  case 1:
160
160
  result = _a.sent();
161
- chai_1.expect(result.code).to.equal(0);
161
+ (0, chai_1.expect)(result.code).to.equal(0);
162
162
  return [4 /*yield*/, firma.Distribution.withdrawAllRewards(aliceWallet, valOperAddress)];
163
163
  case 2:
164
164
  result1 = _a.sent();
165
- chai_1.expect(result1.code).to.equal(0);
165
+ (0, chai_1.expect)(result1.code).to.equal(0);
166
166
  return [2 /*return*/];
167
167
  }
168
168
  });
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -68,7 +68,7 @@ describe('[15. Distribution Query Test]', function () {
68
68
  case 0: return [4 /*yield*/, firma.Distribution.getCommunityPool()];
69
69
  case 1:
70
70
  poolAmount = _a.sent();
71
- chai_1.expect(poolAmount).to.not.equal("");
71
+ (0, chai_1.expect)(poolAmount).to.not.equal("");
72
72
  return [2 /*return*/];
73
73
  }
74
74
  });
@@ -85,10 +85,10 @@ describe('[15. Distribution Query Test]', function () {
85
85
  case 2:
86
86
  result = _a.sent();
87
87
  if (result.length > 0) {
88
- chai_1.expect(result[0].amount).to.not.equal("");
88
+ (0, chai_1.expect)(result[0].amount).to.not.equal("");
89
89
  }
90
90
  else {
91
- chai_1.expect(true).to.be.equal(true);
91
+ (0, chai_1.expect)(true).to.be.equal(true);
92
92
  }
93
93
  return [2 /*return*/];
94
94
  }
@@ -106,10 +106,10 @@ describe('[15. Distribution Query Test]', function () {
106
106
  case 2:
107
107
  result = _a.sent();
108
108
  if (result.length > 0) {
109
- chai_1.expect(result[0].amount).to.not.equal("");
109
+ (0, chai_1.expect)(result[0].amount).to.not.equal("");
110
110
  }
111
111
  else {
112
- chai_1.expect(true).to.be.equal(true);
112
+ (0, chai_1.expect)(true).to.be.equal(true);
113
113
  }
114
114
  return [2 /*return*/];
115
115
  }
@@ -127,7 +127,7 @@ describe('[15. Distribution Query Test]', function () {
127
127
  return [4 /*yield*/, firma.Distribution.getTotalRewardInfo(address)];
128
128
  case 2:
129
129
  result = _a.sent();
130
- chai_1.expect(result.rewards).to.not.equal("");
130
+ (0, chai_1.expect)(result.rewards).to.not.equal("");
131
131
  return [2 /*return*/];
132
132
  }
133
133
  });
@@ -145,7 +145,7 @@ describe('[15. Distribution Query Test]', function () {
145
145
  return [4 /*yield*/, firma.Distribution.getValidatorCommission(newValidatorAddress)];
146
146
  case 2:
147
147
  commission = _a.sent();
148
- chai_1.expect(commission.length).to.not.equal(0);
148
+ (0, chai_1.expect)(commission.length).to.not.equal(0);
149
149
  return [2 /*return*/];
150
150
  }
151
151
  });
@@ -160,10 +160,10 @@ describe('[15. Distribution Query Test]', function () {
160
160
  case 1:
161
161
  result = _a.sent();
162
162
  if (result.rewards.length === 0) {
163
- chai_1.expect(result.total).to.be.equal('');
163
+ (0, chai_1.expect)(result.total).to.be.equal('');
164
164
  }
165
165
  else {
166
- chai_1.expect(result.total).to.not.equal('');
166
+ (0, chai_1.expect)(result.total).to.not.equal('');
167
167
  }
168
168
  return [2 /*return*/];
169
169
  }
@@ -182,10 +182,10 @@ describe('[15. Distribution Query Test]', function () {
182
182
  return [4 /*yield*/, firma.Distribution.getRewardInfo(aliceAddress, validatorAddress)];
183
183
  case 2:
184
184
  amount = _a.sent();
185
- chai_1.expect(amount).to.not.equal('');
185
+ (0, chai_1.expect)(amount).to.not.equal('');
186
186
  return [3 /*break*/, 4];
187
187
  case 3:
188
- chai_1.expect(true).to.be.equal(false);
188
+ (0, chai_1.expect)(true).to.be.equal(false);
189
189
  _a.label = 4;
190
190
  case 4: return [2 /*return*/];
191
191
  }
@@ -198,7 +198,7 @@ describe('[15. Distribution Query Test]', function () {
198
198
  case 0: return [4 /*yield*/, firma.Distribution.getWithdrawAddress(aliceAddress)];
199
199
  case 1:
200
200
  withdrawAddress = _a.sent();
201
- chai_1.expect(__1.FirmaUtil.isValidAddress(withdrawAddress)).to.be.equal(true);
201
+ (0, chai_1.expect)(__1.FirmaUtil.isValidAddress(withdrawAddress)).to.be.equal(true);
202
202
  return [2 /*return*/];
203
203
  }
204
204
  });
@@ -216,7 +216,7 @@ describe('[15. Distribution Query Test]', function () {
216
216
  return [4 /*yield*/, firma.Distribution.getTotalRewardInfo(newAddress)];
217
217
  case 3:
218
218
  result = _a.sent();
219
- chai_1.expect(result.total).to.equal("");
219
+ (0, chai_1.expect)(result.total).to.equal("");
220
220
  return [2 /*return*/];
221
221
  }
222
222
  });
@@ -235,7 +235,7 @@ describe('[15. Distribution Query Test]', function () {
235
235
  return [4 /*yield*/, firma.Distribution.getTotalRewardInfo(newAddress)];
236
236
  case 3:
237
237
  totalReward = _a.sent();
238
- chai_1.expect(totalReward.rewards.length).to.equal(0);
238
+ (0, chai_1.expect)(totalReward.rewards.length).to.equal(0);
239
239
  return [2 /*return*/];
240
240
  }
241
241
  });
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -130,7 +130,7 @@ describe('[16. Gov Tx Test]', function () {
130
130
  return [4 /*yield*/, firma.Gov.submitTextProposal(aliceWallet, title, description, initialDepositFCT)];
131
131
  case 1:
132
132
  result = _a.sent();
133
- chai_1.expect(result.code).to.equal(0);
133
+ (0, chai_1.expect)(result.code).to.equal(0);
134
134
  return [2 /*return*/];
135
135
  }
136
136
  });
@@ -148,7 +148,7 @@ describe('[16. Gov Tx Test]', function () {
148
148
  return [4 /*yield*/, firma.Gov.submitCommunityPoolSpendProposal(aliceWallet, title, summary, initialDepositFCT, amountFCT, recipient)];
149
149
  case 1:
150
150
  result = _a.sent();
151
- chai_1.expect(result.code).to.equal(0);
151
+ (0, chai_1.expect)(result.code).to.equal(0);
152
152
  return [2 /*return*/];
153
153
  }
154
154
  });
@@ -171,7 +171,7 @@ describe('[16. Gov Tx Test]', function () {
171
171
  return [4 /*yield*/, firma.Gov.submitStakingParamsUpdateProposal(aliceWallet, title, summary, initialDepositFCT, params, metadata)];
172
172
  case 2:
173
173
  result = _a.sent();
174
- chai_1.expect(result.code).to.equal(0);
174
+ (0, chai_1.expect)(result.code).to.equal(0);
175
175
  return [2 /*return*/];
176
176
  }
177
177
  });
@@ -192,7 +192,7 @@ describe('[16. Gov Tx Test]', function () {
192
192
  return [4 /*yield*/, firma.Gov.submitGovParamsUpdateProposal(aliceWallet, title, summary, initialDepositFCT, params, metadata)];
193
193
  case 2:
194
194
  result = _a.sent();
195
- chai_1.expect(result.code).to.equal(0);
195
+ (0, chai_1.expect)(result.code).to.equal(0);
196
196
  return [2 /*return*/];
197
197
  }
198
198
  });
@@ -222,7 +222,7 @@ describe('[16. Gov Tx Test]', function () {
222
222
  return [4 /*yield*/, firma.Gov.submitSoftwareUpgradeProposal(aliceWallet, title, summary, initialDeposit, plan, metadata, { gas: gas, fee: fee })];
223
223
  case 2:
224
224
  result = _a.sent();
225
- chai_1.expect(result.code).to.be.equal(0);
225
+ (0, chai_1.expect)(result.code).to.be.equal(0);
226
226
  return [2 /*return*/];
227
227
  }
228
228
  });
@@ -243,7 +243,7 @@ describe('[16. Gov Tx Test]', function () {
243
243
  case 2:
244
244
  result = _a.sent();
245
245
  proposal_id = extractValue(result.events, "submit_proposal", "proposal_id");
246
- chai_1.expect(result.code).to.be.equal(0);
246
+ (0, chai_1.expect)(result.code).to.be.equal(0);
247
247
  return [4 /*yield*/, firma.Gov.getGasEstimationCancelProposal(aliceWallet, proposal_id)];
248
248
  case 3:
249
249
  // CancelProposal
@@ -252,7 +252,7 @@ describe('[16. Gov Tx Test]', function () {
252
252
  return [4 /*yield*/, firma.Gov.cancelProposal(aliceWallet, proposal_id, { gas: gas, fee: fee })];
253
253
  case 4:
254
254
  result = _a.sent();
255
- chai_1.expect(result.code).to.be.equal(0);
255
+ (0, chai_1.expect)(result.code).to.be.equal(0);
256
256
  return [2 /*return*/];
257
257
  }
258
258
  });
@@ -270,7 +270,7 @@ describe('[16. Gov Tx Test]', function () {
270
270
  return [4 /*yield*/, firma.Gov.deposit(aliceWallet, proposalId, amount)];
271
271
  case 1:
272
272
  result = _a.sent();
273
- chai_1.expect(result.code).to.equal(0);
273
+ (0, chai_1.expect)(result.code).to.equal(0);
274
274
  return [2 /*return*/];
275
275
  }
276
276
  });
@@ -284,7 +284,7 @@ describe('[16. Gov Tx Test]', function () {
284
284
  return [4 /*yield*/, firma.Gov.vote(aliceWallet, proposalId, common_1.VotingOption.VOTE_OPTION_YES)];
285
285
  case 1:
286
286
  result = _a.sent();
287
- chai_1.expect(result.code).to.equal(0);
287
+ (0, chai_1.expect)(result.code).to.equal(0);
288
288
  return [2 /*return*/];
289
289
  }
290
290
  });
@@ -298,7 +298,7 @@ describe('[16. Gov Tx Test]', function () {
298
298
  return [4 /*yield*/, firma.Gov.vote(bobWallet, proposalId, common_1.VotingOption.VOTE_OPTION_NO)];
299
299
  case 1:
300
300
  result = _a.sent();
301
- chai_1.expect(result.code).to.equal(0);
301
+ (0, chai_1.expect)(result.code).to.equal(0);
302
302
  return [2 /*return*/];
303
303
  }
304
304
  });
@@ -316,21 +316,21 @@ describe('[16. Gov Tx Test]', function () {
316
316
  return [4 /*yield*/, firma.Gov.submitCommunityPoolSpendProposal(aliceWallet, title, summary, initialDepositFCT, amountFCT, recipient)];
317
317
  case 1:
318
318
  result = _a.sent();
319
- chai_1.expect(result.code).to.equal(0);
319
+ (0, chai_1.expect)(result.code).to.equal(0);
320
320
  proposalId = extractValue(result.events, "submit_proposal", "proposal_id");
321
321
  addDepositAmount = 2500;
322
322
  return [4 /*yield*/, firma.Gov.deposit(aliceWallet, proposalId, addDepositAmount)];
323
323
  case 2:
324
324
  result = _a.sent();
325
- chai_1.expect(result.code).to.equal(0);
325
+ (0, chai_1.expect)(result.code).to.equal(0);
326
326
  return [4 /*yield*/, firma.Gov.vote(aliceWallet, proposalId, common_1.VotingOption.VOTE_OPTION_YES)];
327
327
  case 3:
328
328
  result = _a.sent();
329
- chai_1.expect(result.code).to.equal(0);
329
+ (0, chai_1.expect)(result.code).to.equal(0);
330
330
  return [4 /*yield*/, firma.Gov.vote(aliceWallet, proposalId, common_1.VotingOption.VOTE_OPTION_NO)];
331
331
  case 4:
332
332
  result = _a.sent();
333
- chai_1.expect(result.code).to.equal(0);
333
+ (0, chai_1.expect)(result.code).to.equal(0);
334
334
  return [2 /*return*/];
335
335
  }
336
336
  });
@@ -357,7 +357,7 @@ describe('[16. Gov Tx Test]', function () {
357
357
  return [3 /*break*/, 4];
358
358
  case 3:
359
359
  error_1 = _a.sent();
360
- chai_1.expect(error_1.message).to.equal(errorMsg);
360
+ (0, chai_1.expect)(error_1.message).to.equal(errorMsg);
361
361
  return [3 /*break*/, 4];
362
362
  case 4: return [2 /*return*/];
363
363
  }
@@ -385,7 +385,7 @@ describe('[16. Gov Tx Test]', function () {
385
385
  return [3 /*break*/, 4];
386
386
  case 3:
387
387
  error_2 = _a.sent();
388
- chai_1.expect(error_2.message).to.equal(errorMsg);
388
+ (0, chai_1.expect)(error_2.message).to.equal(errorMsg);
389
389
  return [3 /*break*/, 4];
390
390
  case 4: return [2 /*return*/];
391
391
  }