tek-wallet 0.0.333 → 0.0.334
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((sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.amount)
|
|
269
|
+
setAmount(getAmountAfterDecimal(sendInfoGet === null || sendInfoGet === void 0 ? void 0 : sendInfoGet.amount));
|
|
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((data === null || data === void 0 ? void 0 : data.amount)
|
|
294
|
+
setAmount(getAmountAfterDecimal(data === null || data === void 0 ? void 0 : data.amount));
|
|
295
295
|
setMemo(data === null || data === void 0 ? void 0 : data.text);
|
|
296
296
|
};
|
|
297
297
|
var handleSelectMethod = function (method) {
|
|
@@ -313,6 +313,13 @@ var WithdrawFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
313
313
|
break;
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
+
var getAmountAfterDecimal = function (amount) {
|
|
317
|
+
var _a;
|
|
318
|
+
if (!amount)
|
|
319
|
+
return "";
|
|
320
|
+
var amountNumber = +amount / Math.pow(10, ((_a = selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.decimal) !== null && _a !== void 0 ? _a : 0));
|
|
321
|
+
return amountNumber || "";
|
|
322
|
+
};
|
|
316
323
|
var handleBack = function () {
|
|
317
324
|
if (currentStep === WithdrawStep.CONFIRM &&
|
|
318
325
|
selectedMethod === SendMethods.TRANSFER_INTERNAL) {
|