tek-wallet 0.0.681 → 0.0.682

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.
@@ -1,8 +1,13 @@
1
1
  import { ConfirmLayoutProps } from "../ConfirmLayout";
2
2
  import { SendInternalResponse } from "../../../services/axios/send-internal-service/type";
3
3
  import { InstructionBody } from "../../../services/axios/instructions-service/type";
4
+ export type TransferConfirmationData = InstructionBody & {
5
+ amount: number;
6
+ currency_slug: string;
7
+ to_address: string;
8
+ };
4
9
  interface TransferConfirmationProps extends Omit<ConfirmLayoutProps, "action"> {
5
- transferData: InstructionBody;
10
+ transferData: TransferConfirmationData;
6
11
  transferContent: React.ReactNode;
7
12
  titleHeader: string;
8
13
  onTransferSuccess?: (data: SendInternalResponse) => any;
@@ -121,15 +121,9 @@ exports.TransferConfirmation = (0, react_1.forwardRef)(function (props, ref) {
121
121
  var _e = (0, react_1.useState)(Button_1.BUTTON_STATUS.ENABLED), buttonStatus = _e[0], setButtonStatus = _e[1];
122
122
  var _f = (0, react_1.useState)(false), isValidatingAddress = _f[0], setIsValidatingAddress = _f[1];
123
123
  var _g = (0, react_1.useState)(undefined), errorAddress = _g[0], setErrorAddress = _g[1];
124
- var _h = (0, react_1.useMemo)(function () {
125
- var _a, _b, _c, _d, _e, _f, _g;
126
- return {
127
- transferDetails: (_a = transferData.instructions[0]) !== null && _a !== void 0 ? _a : {},
128
- amount: (_d = (_c = (_b = transferData.instructions[0]) === null || _b === void 0 ? void 0 : _b.currency_update_info[0]) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : 0,
129
- currencySlug: (_g = (_f = (_e = transferData.instructions[0]) === null || _e === void 0 ? void 0 : _e.currency_update_info[0]) === null || _f === void 0 ? void 0 : _f.currency_slug) !== null && _g !== void 0 ? _g : "",
130
- };
131
- }, [transferData]), transferDetails = _h.transferDetails, amount = _h.amount, currencySlug = _h.currencySlug;
132
- var toAddress = transferDetails.master_wallet_address;
124
+ var toAddress = transferData.to_address;
125
+ var amount = transferData.amount;
126
+ var currencySlug = transferData.currency_slug;
133
127
  var token = (0, react_1.useMemo)(function () {
134
128
  return sendInternalTokens === null || sendInternalTokens === void 0 ? void 0 : sendInternalTokens.find(function (token) { return token.slug === currencySlug; });
135
129
  }, [currencySlug, sendInternalTokens]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.681",
3
+ "version": "0.0.682",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",