@multiversx/sdk-dapp-liquidity 2.1.1-alpha.0 → 2.3.0-alpha.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.
@@ -94,6 +94,7 @@ export declare const useBridgeFormik: ({ sender, receiver, firstToken, firstAmou
94
94
  fromChainError: string | undefined;
95
95
  senderAddressError: string | undefined;
96
96
  receiverAddressError: string | undefined;
97
+ confirmRateError: string | undefined;
97
98
  handleBlur: {
98
99
  (e: React.FocusEvent<any, Element>): void;
99
100
  <T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("formik"),d=require("react"),u=require("yup"),G=require("./validation/useAmountSchema.js"),H=require("./validation/useSecondAmountSchema.js"),J=require("../../api/confirmRate.js"),K=require("../../helpers/assertRateConfirmationMatchesIntent.js"),Q=require("../../helpers/getApiURL.js"),y=require("../../helpers/isValidAddressForChainType.js"),j=require("../../types/providerType.js"),X=require("../context/useWeb3App.js");var E=(o=>(o.firstToken="firstToken",o.firstAmount="firstAmount",o.secondToken="secondToken",o.secondAmount="secondAmount",o.fromChainId="fromChainId",o.toChainId="toChainId",o))(E||{});const Y=({sender:o,receiver:c,firstToken:m,firstAmount:h,secondToken:l,secondAmount:A,fromChainId:p,toChainId:I,setForceRefetchRate:C,rate:n,onSubmit:M,isMvxConnected:O,senderChainType:v,receiverChainType:S})=>{const i=d.useRef(),{nativeAuthToken:P}=X.useWeb3App(),q=!o||!v?!0:y.isValidAddressForChainType(o,v),T=!c||!S?!0:y.isValidAddressForChainType(c,S),V=o&&!q?`Invalid ${v} sender address`:void 0,$=c&&!T?`Invalid ${S} receiver address`:void 0,w={firstAmount:"",secondAmount:"",fromChainId:p??"",toChainId:I??""},_=()=>{a.setTouched({},!1),a.setErrors({}),e("firstAmount",""),e("secondAmount","")},F=async s=>{var b,g;if(!i.current){i.current=!0;try{if(!q||!T){i.current=!1;return}const{data:k}=await J.confirmRate({url:Q.getApiURL(),nativeAuthToken:P??"",body:{tokenIn:((b=s.firstToken)==null?void 0:b.address)??"",amountIn:(h==null?void 0:h.toString())??"",fromChainId:s.fromChainId??"",tokenOut:((g=s.secondToken)==null?void 0:g.address)??"",toChainId:s.toChainId??"",amountOut:(A==null?void 0:A.toString())??"",sender:o??"",receiver:c??"",fee:(n==null?void 0:n.fee)??"0",provider:(n==null?void 0:n.provider)??j.ProviderType.None,orderId:(n==null?void 0:n.orderId)??""}}),t=k;if(!t||t.length===0){i.current=!1;return}K.assertRateConfirmationMatchesIntent({fromChainId:s.fromChainId??"",sender:o??""},t),_(),M({transactions:t,provider:(n==null?void 0:n.provider)??j.ProviderType.None})}catch(k){console.error("Error confirming rate:",k),C==null||C(t=>t+1)}finally{i.current=!1}}},a=D.useFormik({initialValues:w,validationSchema:u.object().shape({firstAmount:G.useAmountSchema({isMvxConnected:O}),firstToken:u.object().required(),secondAmount:H.useSecondAmountSchema(),secondToken:u.object().required(),fromChainId:u.string().required(),toChainId:u.string().required()}),onSubmit:F}),{errors:r,touched:f,handleBlur:L,handleSubmit:N,handleChange:R,setFieldValue:e,setFieldTouched:U}=a;d.useEffect(()=>{e("firstToken",m,!0)},[m]),d.useEffect(()=>{e("secondToken",l,!0)},[l]),d.useEffect(()=>{e("fromChainId",p,!0)},[p]),d.useEffect(()=>{e("toChainId",I,!0)},[I]);const W="secondAmount"in r&&"secondAmount"in f?r.secondAmount:void 0,x="firstAmount"in r&&"firstAmount"in f?r.firstAmount:void 0,z="fromChainId"in r&&"fromChainId"in f?r.fromChainId:void 0;return{formik:a,errors:r,touched:f,firstToken:m,secondToken:l,firstAmountError:x,secondAmountError:W,fromChainError:z,senderAddressError:V,receiverAddressError:$,handleBlur:L,handleChange:R,handleSubmit:N,setFieldValue:e,resetSwapForm:_,setFieldTouched:U}};exports.BridgeFormikValuesEnum=E;exports.useBridgeFormik=Y;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("formik"),d=require("react"),a=require("yup"),K=require("./validation/useAmountSchema.js"),Q=require("./validation/useSecondAmountSchema.js"),X=require("../../api/confirmRate.js"),Y=require("../../helpers/assertConfirmRateData.js"),Z=require("../../helpers/assertRateConfirmationMatchesIntent.js"),B=require("../../helpers/getApiURL.js"),R=require("../../helpers/isValidAddressForChainType.js"),j=require("../../types/errors.js"),M=require("../../types/providerType.js"),oo=require("../context/useWeb3App.js");var D=(r=>(r.firstToken="firstToken",r.firstAmount="firstAmount",r.secondToken="secondToken",r.secondAmount="secondAmount",r.fromChainId="fromChainId",r.toChainId="toChainId",r))(D||{});const ro=({sender:r,receiver:c,firstToken:h,firstAmount:I,secondToken:C,secondAmount:l,fromChainId:p,toChainId:A,setForceRefetchRate:S,rate:o,onSubmit:O,isMvxConnected:P,senderChainType:q,receiverChainType:v})=>{const u=d.useRef(),{nativeAuthToken:k}=oo.useWeb3App(),[V,_]=d.useState(void 0),g=!r||!q?!0:R.isValidAddressForChainType(r,q),T=!c||!v?!0:R.isValidAddressForChainType(c,v),$=r&&!g?`Invalid ${q} sender address`:void 0,w=c&&!T?`Invalid ${v} receiver address`:void 0,F={firstAmount:"",secondAmount:"",fromChainId:p??"",toChainId:A??""},b=()=>{f.setTouched({},!1),f.setErrors({}),e("firstAmount",""),e("secondAmount","")},L=async t=>{var y,E;if(!u.current){u.current=!0,_(void 0);try{if(!g||!T){u.current=!1;return}Y.assertConfirmRateData({nativeAuthToken:k,orderId:o==null?void 0:o.orderId,fromChainId:t.fromChainId,toChainId:t.toChainId,sender:r,receiver:c});const{data:i}=await X.confirmRate({url:B.getApiURL(),nativeAuthToken:k??"",body:{tokenIn:((y=t.firstToken)==null?void 0:y.address)??"",amountIn:(I==null?void 0:I.toString())??"",fromChainId:t.fromChainId??"",tokenOut:((E=t.secondToken)==null?void 0:E.address)??"",toChainId:t.toChainId??"",amountOut:(l==null?void 0:l.toString())??"",sender:r??"",receiver:c??"",fee:(o==null?void 0:o.fee)??"0",provider:(o==null?void 0:o.provider)??M.ProviderType.None,orderId:(o==null?void 0:o.orderId)??""}}),s=i;if(!s||s.length===0){u.current=!1;return}Z.assertRateConfirmationMatchesIntent({fromChainId:t.fromChainId??"",sender:r??""},s),b(),O({transactions:s,provider:(o==null?void 0:o.provider)??M.ProviderType.None})}catch(i){console.error("Error confirming rate:",i),i instanceof j.ConfirmRateError||i instanceof j.MissingConfirmRateDataError?_(i.message):S==null||S(s=>s+1)}finally{u.current=!1}}},f=J.useFormik({initialValues:F,validationSchema:a.object().shape({firstAmount:K.useAmountSchema({isMvxConnected:P}),firstToken:a.object().required(),secondAmount:Q.useSecondAmountSchema(),secondToken:a.object().required(),fromChainId:a.string().required(),toChainId:a.string().required()}),onSubmit:L}),{errors:n,touched:m,handleBlur:N,handleSubmit:U,handleChange:W,setFieldValue:e,setFieldTouched:x}=f;d.useEffect(()=>{e("firstToken",h,!0)},[h]),d.useEffect(()=>{e("secondToken",C,!0)},[C]),d.useEffect(()=>{e("fromChainId",p,!0)},[p]),d.useEffect(()=>{e("toChainId",A,!0)},[A]);const z="secondAmount"in n&&"secondAmount"in m?n.secondAmount:void 0,G="firstAmount"in n&&"firstAmount"in m?n.firstAmount:void 0,H="fromChainId"in n&&"fromChainId"in m?n.fromChainId:void 0;return{formik:f,errors:n,touched:m,firstToken:h,secondToken:C,firstAmountError:G,secondAmountError:z,fromChainError:H,senderAddressError:$,receiverAddressError:w,confirmRateError:V,handleBlur:N,handleChange:W,handleSubmit:U,setFieldValue:e,resetSwapForm:b,setFieldTouched:x}};exports.BridgeFormikValuesEnum=D;exports.useBridgeFormik=ro;
@@ -1,131 +1,144 @@
1
- import { useFormik as K } from "formik";
2
- import { useRef as Q, useEffect as u } from "react";
3
- import { object as k, string as w } from "yup";
4
- import { useAmountSchema as V } from "./validation/useAmountSchema.mjs";
5
- import { useSecondAmountSchema as X } from "./validation/useSecondAmountSchema.mjs";
6
- import { confirmRate as Y } from "../../api/confirmRate.mjs";
7
- import { assertRateConfirmationMatchesIntent as Z } from "../../helpers/assertRateConfirmationMatchesIntent.mjs";
8
- import { getApiURL as _ } from "../../helpers/getApiURL.mjs";
9
- import { isValidAddressForChainType as y } from "../../helpers/isValidAddressForChainType.mjs";
10
- import { ProviderType as N } from "../../types/providerType.mjs";
11
- import { useWeb3App as F } from "../context/useWeb3App.mjs";
12
- var R = /* @__PURE__ */ ((o) => (o.firstToken = "firstToken", o.firstAmount = "firstAmount", o.secondToken = "secondToken", o.secondAmount = "secondAmount", o.fromChainId = "fromChainId", o.toChainId = "toChainId", o))(R || {});
13
- const co = ({
14
- sender: o,
1
+ import { useFormik as Q } from "formik";
2
+ import { useRef as V, useState as X, useEffect as u } from "react";
3
+ import { object as k, string as y } from "yup";
4
+ import { useAmountSchema as Y } from "./validation/useAmountSchema.mjs";
5
+ import { useSecondAmountSchema as Z } from "./validation/useSecondAmountSchema.mjs";
6
+ import { confirmRate as _ } from "../../api/confirmRate.mjs";
7
+ import { assertConfirmRateData as F } from "../../helpers/assertConfirmRateData.mjs";
8
+ import { assertRateConfirmationMatchesIntent as B } from "../../helpers/assertRateConfirmationMatchesIntent.mjs";
9
+ import { getApiURL as oo } from "../../helpers/getApiURL.mjs";
10
+ import { isValidAddressForChainType as D } from "../../helpers/isValidAddressForChainType.mjs";
11
+ import { ConfirmRateError as ro, MissingConfirmRateDataError as no } from "../../types/errors.mjs";
12
+ import { ProviderType as M } from "../../types/providerType.mjs";
13
+ import { useWeb3App as io } from "../context/useWeb3App.mjs";
14
+ var to = /* @__PURE__ */ ((r) => (r.firstToken = "firstToken", r.firstAmount = "firstAmount", r.secondToken = "secondToken", r.secondAmount = "secondAmount", r.fromChainId = "fromChainId", r.toChainId = "toChainId", r))(to || {});
15
+ const So = ({
16
+ sender: r,
15
17
  receiver: e,
16
- firstToken: c,
17
- firstAmount: a,
18
- secondToken: h,
19
- secondAmount: I,
18
+ firstToken: a,
19
+ firstAmount: h,
20
+ secondToken: I,
21
+ secondAmount: C,
20
22
  fromChainId: p,
21
23
  toChainId: A,
22
24
  setForceRefetchRate: l,
23
- rate: r,
24
- onSubmit: O,
25
- isMvxConnected: $,
26
- senderChainType: C,
27
- receiverChainType: S
25
+ rate: o,
26
+ onSubmit: N,
27
+ isMvxConnected: O,
28
+ senderChainType: S,
29
+ receiverChainType: v
28
30
  }) => {
29
- const d = Q(), { nativeAuthToken: j } = F(), T = !o || !C ? !0 : y(o, C), b = !e || !S ? !0 : y(e, S), x = o && !T ? `Invalid ${C} sender address` : void 0, L = e && !b ? `Invalid ${S} receiver address` : void 0, M = {
31
+ const m = V(), { nativeAuthToken: g } = io(), [$, T] = X(
32
+ void 0
33
+ ), E = !r || !S ? !0 : D(r, S), b = !e || !v ? !0 : D(e, v), j = r && !E ? `Invalid ${S} sender address` : void 0, x = e && !b ? `Invalid ${v} receiver address` : void 0, L = {
30
34
  firstAmount: "",
31
35
  secondAmount: "",
32
36
  fromChainId: p ?? "",
33
37
  toChainId: A ?? ""
34
- }, g = () => {
35
- m.setTouched({}, !1), m.setErrors({}), i("firstAmount", ""), i("secondAmount", "");
36
- }, P = async (s) => {
37
- var q, E;
38
- if (!d.current) {
39
- d.current = !0;
38
+ }, q = () => {
39
+ f.setTouched({}, !1), f.setErrors({}), i("firstAmount", ""), i("secondAmount", "");
40
+ }, P = async (t) => {
41
+ var R, w;
42
+ if (!m.current) {
43
+ m.current = !0, T(void 0);
40
44
  try {
41
- if (!T || !b) {
42
- d.current = !1;
45
+ if (!E || !b) {
46
+ m.current = !1;
43
47
  return;
44
48
  }
45
- const { data: v } = await Y({
46
- url: _(),
47
- nativeAuthToken: j ?? "",
49
+ F({
50
+ nativeAuthToken: g,
51
+ orderId: o == null ? void 0 : o.orderId,
52
+ fromChainId: t.fromChainId,
53
+ toChainId: t.toChainId,
54
+ sender: r,
55
+ receiver: e
56
+ });
57
+ const { data: d } = await _({
58
+ url: oo(),
59
+ nativeAuthToken: g ?? "",
48
60
  body: {
49
- tokenIn: ((q = s.firstToken) == null ? void 0 : q.address) ?? "",
50
- amountIn: (a == null ? void 0 : a.toString()) ?? "",
51
- fromChainId: s.fromChainId ?? "",
52
- tokenOut: ((E = s.secondToken) == null ? void 0 : E.address) ?? "",
53
- toChainId: s.toChainId ?? "",
54
- amountOut: (I == null ? void 0 : I.toString()) ?? "",
55
- sender: o ?? "",
61
+ tokenIn: ((R = t.firstToken) == null ? void 0 : R.address) ?? "",
62
+ amountIn: (h == null ? void 0 : h.toString()) ?? "",
63
+ fromChainId: t.fromChainId ?? "",
64
+ tokenOut: ((w = t.secondToken) == null ? void 0 : w.address) ?? "",
65
+ toChainId: t.toChainId ?? "",
66
+ amountOut: (C == null ? void 0 : C.toString()) ?? "",
67
+ sender: r ?? "",
56
68
  receiver: e ?? "",
57
- fee: (r == null ? void 0 : r.fee) ?? "0",
58
- provider: (r == null ? void 0 : r.provider) ?? N.None,
59
- orderId: (r == null ? void 0 : r.orderId) ?? ""
69
+ fee: (o == null ? void 0 : o.fee) ?? "0",
70
+ provider: (o == null ? void 0 : o.provider) ?? M.None,
71
+ orderId: (o == null ? void 0 : o.orderId) ?? ""
60
72
  }
61
- }), t = v;
62
- if (!t || t.length === 0) {
63
- d.current = !1;
73
+ }), s = d;
74
+ if (!s || s.length === 0) {
75
+ m.current = !1;
64
76
  return;
65
77
  }
66
- Z(
67
- { fromChainId: s.fromChainId ?? "", sender: o ?? "" },
68
- t
69
- ), g(), O({
70
- transactions: t,
71
- provider: (r == null ? void 0 : r.provider) ?? N.None
78
+ B(
79
+ { fromChainId: t.fromChainId ?? "", sender: r ?? "" },
80
+ s
81
+ ), q(), N({
82
+ transactions: s,
83
+ provider: (o == null ? void 0 : o.provider) ?? M.None
72
84
  });
73
- } catch (v) {
74
- console.error("Error confirming rate:", v), l == null || l((t) => t + 1);
85
+ } catch (d) {
86
+ console.error("Error confirming rate:", d), d instanceof ro || d instanceof no ? T(d.message) : l == null || l((s) => s + 1);
75
87
  } finally {
76
- d.current = !1;
88
+ m.current = !1;
77
89
  }
78
90
  }
79
- }, m = K({
80
- initialValues: M,
91
+ }, f = Q({
92
+ initialValues: L,
81
93
  validationSchema: k().shape({
82
- firstAmount: V({ isMvxConnected: $ }),
94
+ firstAmount: Y({ isMvxConnected: O }),
83
95
  firstToken: k().required(),
84
- secondAmount: X(),
96
+ secondAmount: Z(),
85
97
  secondToken: k().required(),
86
- fromChainId: w().required(),
87
- toChainId: w().required()
98
+ fromChainId: y().required(),
99
+ toChainId: y().required()
88
100
  }),
89
101
  onSubmit: P
90
102
  }), {
91
103
  errors: n,
92
- touched: f,
104
+ touched: c,
93
105
  handleBlur: U,
94
106
  handleSubmit: W,
95
107
  handleChange: z,
96
108
  setFieldValue: i,
97
- setFieldTouched: D
98
- } = m;
109
+ setFieldTouched: G
110
+ } = f;
99
111
  u(() => {
100
- i("firstToken", c, !0);
101
- }, [c]), u(() => {
102
- i("secondToken", h, !0);
103
- }, [h]), u(() => {
112
+ i("firstToken", a, !0);
113
+ }, [a]), u(() => {
114
+ i("secondToken", I, !0);
115
+ }, [I]), u(() => {
104
116
  i("fromChainId", p, !0);
105
117
  }, [p]), u(() => {
106
118
  i("toChainId", A, !0);
107
119
  }, [A]);
108
- const G = "secondAmount" in n && "secondAmount" in f ? n.secondAmount : void 0, H = "firstAmount" in n && "firstAmount" in f ? n.firstAmount : void 0, J = "fromChainId" in n && "fromChainId" in f ? n.fromChainId : void 0;
120
+ const H = "secondAmount" in n && "secondAmount" in c ? n.secondAmount : void 0, J = "firstAmount" in n && "firstAmount" in c ? n.firstAmount : void 0, K = "fromChainId" in n && "fromChainId" in c ? n.fromChainId : void 0;
109
121
  return {
110
- formik: m,
122
+ formik: f,
111
123
  errors: n,
112
- touched: f,
113
- firstToken: c,
114
- secondToken: h,
115
- firstAmountError: H,
116
- secondAmountError: G,
117
- fromChainError: J,
118
- senderAddressError: x,
119
- receiverAddressError: L,
124
+ touched: c,
125
+ firstToken: a,
126
+ secondToken: I,
127
+ firstAmountError: J,
128
+ secondAmountError: H,
129
+ fromChainError: K,
130
+ senderAddressError: j,
131
+ receiverAddressError: x,
132
+ confirmRateError: $,
120
133
  handleBlur: U,
121
134
  handleChange: z,
122
135
  handleSubmit: W,
123
136
  setFieldValue: i,
124
- resetSwapForm: g,
125
- setFieldTouched: D
137
+ resetSwapForm: q,
138
+ setFieldTouched: G
126
139
  };
127
140
  };
128
141
  export {
129
- R as BridgeFormikValuesEnum,
130
- co as useBridgeFormik
142
+ to as BridgeFormikValuesEnum,
143
+ So as useBridgeFormik
131
144
  };
@@ -0,0 +1,19 @@
1
+ import { ChainType } from '../../types/chainType';
2
+
3
+ /**
4
+ * Returns the connected wallet address scoped to the AppKit namespace that corresponds
5
+ * to the given chain type, preventing a stale SUI address from leaking into EVM form
6
+ * fields (and vice-versa) during namespace switches.
7
+ *
8
+ * Mapping:
9
+ * ChainType.sui → 'sui' namespace
10
+ * ChainType.evm → 'eip155' namespace
11
+ * ChainType.mvx → undefined (MVX addresses come from the dApp's own auth layer)
12
+ * all others → undefined
13
+ *
14
+ * Because hooks must be called unconditionally and before derived values in the same
15
+ * component, call this hook at the top of the component and pass the chain type that
16
+ * will be resolved later (it can be undefined on first render — the hook reads both
17
+ * namespaces unconditionally and picks based on chainType).
18
+ */
19
+ export declare function useNamespaceAddress(chainType: ChainType | undefined): string | undefined;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@reown/appkit/react"),s=require("../../types/chainType.js");function u(c){const t=e.useAppKitAccount({namespace:"sui"}),n=e.useAppKitAccount({namespace:"eip155"});switch(c){case s.ChainType.sui:return t.address;case s.ChainType.evm:return n.address;default:return}}exports.useNamespaceAddress=u;
@@ -0,0 +1,16 @@
1
+ import { useAppKitAccount as e } from "@reown/appkit/react";
2
+ import { ChainType as s } from "../../types/chainType.mjs";
3
+ function a(c) {
4
+ const t = e({ namespace: "sui" }), r = e({ namespace: "eip155" });
5
+ switch (c) {
6
+ case s.sui:
7
+ return t.address;
8
+ case s.evm:
9
+ return r.address;
10
+ default:
11
+ return;
12
+ }
13
+ }
14
+ export {
15
+ a as useNamespaceAddress
16
+ };
package/types/errors.d.ts CHANGED
@@ -1,3 +1,18 @@
1
1
  export declare class RateConfirmationMismatchError extends Error {
2
2
  constructor(message: string);
3
3
  }
4
+ /**
5
+ * Thrown when a required system token (nativeAuthToken, orderId) is missing before
6
+ * calling confirmRate. Generic message — not shown verbatim to end users.
7
+ */
8
+ export declare class ConfirmRateError extends Error {
9
+ constructor(message: string);
10
+ }
11
+ /**
12
+ * Thrown when a required form field (fromChainId, toChainId, sender, receiver) is
13
+ * missing or empty before calling confirmRate. Message names the missing field so it
14
+ * can be displayed to the user.
15
+ */
16
+ export declare class MissingConfirmRateDataError extends Error {
17
+ constructor(message: string);
18
+ }
package/types/errors.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class t extends Error{constructor(r){super(r),this.name="RateConfirmationMismatchError"}}exports.RateConfirmationMismatchError=t;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class o extends Error{constructor(r){super(r),this.name="RateConfirmationMismatchError"}}class e extends Error{constructor(r){super(r),this.name="ConfirmRateError"}}class s extends Error{constructor(r){super(r),this.name="MissingConfirmRateDataError"}}exports.ConfirmRateError=e;exports.MissingConfirmRateDataError=s;exports.RateConfirmationMismatchError=o;
package/types/errors.mjs CHANGED
@@ -3,6 +3,18 @@ class o extends Error {
3
3
  super(r), this.name = "RateConfirmationMismatchError";
4
4
  }
5
5
  }
6
+ class s extends Error {
7
+ constructor(r) {
8
+ super(r), this.name = "ConfirmRateError";
9
+ }
10
+ }
11
+ class a extends Error {
12
+ constructor(r) {
13
+ super(r), this.name = "MissingConfirmRateDataError";
14
+ }
15
+ }
6
16
  export {
17
+ s as ConfirmRateError,
18
+ a as MissingConfirmRateDataError,
7
19
  o as RateConfirmationMismatchError
8
20
  };