tek-wallet 0.0.334 → 0.0.335

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.
@@ -266,7 +266,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
266
266
  console.warn("🚀 ~ handleSelectTransferInternal ~ sendInfoGet:", sendInfoGet);
267
267
  setSelectedMethod(SendMethods.TRANSFER_INTERNAL);
268
268
  setRecipientAddress(recipientAddressInternal);
269
- setAmount(getAmountAfterDecimal(sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.amount));
269
+ setAmount(getAmountAfterDecimal((sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.amount) || 0, (tokenSet === null || tokenSet === void 0 ? void 0 : tokenSet.decimal) || 0));
270
270
  if (!tokenSet) {
271
271
  gotoStep(WithdrawStep.SELECT_TOKEN);
272
272
  }
@@ -291,7 +291,7 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
291
291
  }
292
292
  setSelectedMethod(SendMethods.TRANSFER_EXTERNAL);
293
293
  setRecipientAddress(data === null || data === void 0 ? void 0 : data.address);
294
- setAmount(getAmountAfterDecimal(data === null || data === void 0 ? void 0 : data.amount));
294
+ setAmount(getAmountAfterDecimal((data === null || data === void 0 ? void 0 : data.amount) || 0, (tokenSet === null || tokenSet === void 0 ? void 0 : tokenSet.decimal) || 0));
295
295
  setMemo(data === null || data === void 0 ? void 0 : data.text);
296
296
  };
297
297
  var handleSelectMethod = function (method) {
@@ -313,11 +313,10 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
313
313
  break;
314
314
  }
315
315
  };
316
- var getAmountAfterDecimal = function (amount) {
317
- var _a;
316
+ var getAmountAfterDecimal = function (amount, decimal) {
318
317
  if (!amount)
319
318
  return "";
320
- var amountNumber = +amount / Math.pow(10, ((_a = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.decimal) !== null && _a !== void 0 ? _a : 0));
319
+ var amountNumber = +amount / Math.pow(10, decimal);
321
320
  return amountNumber || "";
322
321
  };
323
322
  var handleBack = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.334",
3
+ "version": "0.0.335",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",