@coinflowlabs/react-native 3.0.0 → 3.1.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.
- package/README.md +6 -0
- package/build/CoinflowPurchase.d.ts +1 -1
- package/build/CoinflowPurchase.js +2 -2
- package/build/CoinflowPurchase.js.map +1 -1
- package/build/CoinflowPurchaseHistory.js +4 -0
- package/build/CoinflowPurchaseHistory.js.map +1 -1
- package/build/CoinflowTypes.d.ts +29 -13
- package/build/CoinflowWithdraw.d.ts +1 -1
- package/build/CoinflowWithdraw.js +2 -2
- package/build/CoinflowWithdraw.js.map +1 -1
- package/build/CoinflowWithdrawHistory.js +4 -0
- package/build/CoinflowWithdrawHistory.js.map +1 -1
- package/build/ReactNativeCoinflowUtils.d.ts +1 -1
- package/build/ReactNativeCoinflowUtils.js +5 -1
- package/build/ReactNativeCoinflowUtils.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ Props:
|
|
|
24
24
|
* `bankAccountLinkRedirect` (optional): The URL to be used for bank account setup
|
|
25
25
|
* `supportsVersionedTransactions` (optional): Instruct the system that versioned transactions are supported
|
|
26
26
|
* `additionalWallets` (optional): Define additional wallets to assign to the user
|
|
27
|
+
* `usePermit` (optional): Pass as false to disable permit message signing for EVM and use approve transactions
|
|
27
28
|
* `transactionSigner` (optional): Public Key of the wallet which will actually execute the withdrawal transaction. Must be associated with the same withdrawer as the main wallet.
|
|
28
29
|
|
|
29
30
|
## Purchase Usage
|
|
@@ -59,6 +60,11 @@ Props:
|
|
|
59
60
|
* `rent` (optional, Solana only): Specify the blockchain rent amount to add to the total
|
|
60
61
|
* `nativeSolToConvert` (optional, Solana only): Specify the amount of native SOL to convert wSOL for the purchase
|
|
61
62
|
|
|
63
|
+
## 3.1.0
|
|
64
|
+
|
|
65
|
+
- Added base blockchain support
|
|
66
|
+
- Added AuthOnly parameter to CoinflowPurchase
|
|
67
|
+
|
|
62
68
|
## 3.0.0
|
|
63
69
|
|
|
64
70
|
- Require `signMessage` on wallets for stronger withdraw authentication
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CoinflowPurchaseProps, WithStyles } from './CoinflowTypes';
|
|
3
|
-
export declare function CoinflowPurchase(props: CoinflowPurchaseProps & WithStyles): React.JSX.Element
|
|
3
|
+
export declare function CoinflowPurchase(props: CoinflowPurchaseProps & WithStyles): React.JSX.Element;
|
|
@@ -14,10 +14,10 @@ export function CoinflowPurchase(props) {
|
|
|
14
14
|
return React.createElement(EvmPurchase, __assign({}, props));
|
|
15
15
|
case 'eth':
|
|
16
16
|
return React.createElement(EvmPurchase, __assign({}, props));
|
|
17
|
+
case 'base':
|
|
18
|
+
return React.createElement(EvmPurchase, __assign({}, props));
|
|
17
19
|
case 'near':
|
|
18
20
|
return React.createElement(NearPurchase, __assign({}, props));
|
|
19
|
-
default:
|
|
20
|
-
return null;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
function SolanaPurchase(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowPurchase.js","sourceRoot":"","sources":["../src/CoinflowPurchase.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinflowPurchase.js","sourceRoot":"","sources":["../src/CoinflowPurchase.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAUlD,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAC,8BAA8B,EAAC,MAAM,sCAAsC,CAAC;AACpF,OAAO,MAAM,MAAM,MAAM,CAAC;AAC1B,OAAO,EAA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,MAAM,CAAC,CACf,CAAC;IAEF,OAAO,CACL,oBAAC,eAAe,aACd,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,EACjC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,IAClC,KAAK,IACT,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,oBAAoB,IAC1C,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -12,6 +12,10 @@ export function CoinflowPurchaseHistory(props) {
|
|
|
12
12
|
return props.wallet.accountId;
|
|
13
13
|
case 'polygon':
|
|
14
14
|
return props.wallet.address;
|
|
15
|
+
case 'eth':
|
|
16
|
+
return props.wallet.address;
|
|
17
|
+
case 'base':
|
|
18
|
+
return props.wallet.address;
|
|
15
19
|
}
|
|
16
20
|
}, []);
|
|
17
21
|
return (React.createElement(CoinflowWebView, __assign({ publicKey: publicKey, WebViewRef: WebViewRef, handleIframeMessages: function () { return Promise.resolve(); }, route: "/history/purchase/".concat(props.merchantId) }, props)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowPurchaseHistory.js","sourceRoot":"","sources":["../src/CoinflowPurchaseHistory.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,MAAM,UAAU,uBAAuB,CACrC,KAAwC;IAExC,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAa,IAAI,CAAC,CAAC,CAAC,oBAAoB;IAEvE,IAAM,SAAS,GAAG,OAAO,CAAC;;QACxB,QAAQ,KAAK,CAAC,UAAU,EAAE,CAAC;YACzB,KAAK,QAAQ;gBACX,OAAO,MAAA,KAAK,CAAC,MAAM,CAAC,SAAS,0CAAE,QAAQ,EAAE,CAAC;YAC5C,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,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,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAM,OAAA,OAAO,CAAC,OAAO,EAAE,EAAjB,CAAiB,EAC7C,KAAK,EAAE,4BAAqB,KAAK,CAAC,UAAU,CAAE,IAC1C,KAAK,EACT,CACH,CAAC;AACJ,CAAC"}
|
package/build/CoinflowTypes.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface CustomerInfo {
|
|
|
40
40
|
lng?: string;
|
|
41
41
|
}
|
|
42
42
|
/** Coinflow Types **/
|
|
43
|
-
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon';
|
|
43
|
+
export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base';
|
|
44
44
|
export type CoinflowEnvs = 'prod' | 'staging' | 'sandbox' | 'local';
|
|
45
45
|
export type ChargebackProtectionData = ChargebackProtectionItem[];
|
|
46
46
|
export interface ChargebackProtectionItem {
|
|
@@ -90,7 +90,8 @@ export type CoinflowWebViewProps = Omit<CoinflowIFrameProps, 'IFrameRef'> & {
|
|
|
90
90
|
supportsVersionedTransactions?: boolean;
|
|
91
91
|
lockAmount?: boolean;
|
|
92
92
|
theme?: MerchantTheme;
|
|
93
|
-
|
|
93
|
+
usePermit?: boolean;
|
|
94
|
+
} & Pick<CoinflowCommonPurchaseProps, 'authOnly'>;
|
|
94
95
|
export type WithStyles = {
|
|
95
96
|
style?: StyleProp<ViewStyle>;
|
|
96
97
|
};
|
|
@@ -136,15 +137,19 @@ export interface CoinflowNearHistoryProps extends CoinflowTypes {
|
|
|
136
137
|
wallet: Omit<NearWallet, 'signAndSendTransaction'>;
|
|
137
138
|
blockchain: 'near';
|
|
138
139
|
}
|
|
139
|
-
export interface
|
|
140
|
-
wallet:
|
|
140
|
+
export interface CoinflowEvmHistoryProps extends CoinflowTypes {
|
|
141
|
+
wallet: EthWallet;
|
|
142
|
+
}
|
|
143
|
+
export interface CoinflowEthHistoryProps extends CoinflowEvmHistoryProps {
|
|
141
144
|
blockchain: 'eth';
|
|
142
145
|
}
|
|
143
|
-
export interface CoinflowPolygonHistoryProps extends
|
|
144
|
-
wallet: Omit<EthWallet, 'sendTransaction' | 'signMessage'>;
|
|
146
|
+
export interface CoinflowPolygonHistoryProps extends CoinflowEvmHistoryProps {
|
|
145
147
|
blockchain: 'polygon';
|
|
146
148
|
}
|
|
147
|
-
export
|
|
149
|
+
export interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
|
|
150
|
+
blockchain: 'base';
|
|
151
|
+
}
|
|
152
|
+
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps;
|
|
148
153
|
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount'> {
|
|
149
154
|
WebViewRef: React.RefObject<any | null>;
|
|
150
155
|
route: string;
|
|
@@ -165,6 +170,8 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>,
|
|
|
165
170
|
disableApplePay?: boolean;
|
|
166
171
|
disableGooglePay?: boolean;
|
|
167
172
|
planCode?: string;
|
|
173
|
+
settlementType?: SettlementType;
|
|
174
|
+
usePermit?: boolean;
|
|
168
175
|
}
|
|
169
176
|
/** Transactions **/
|
|
170
177
|
export type NearFtTransferCallAction = {
|
|
@@ -187,6 +194,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
187
194
|
disableApplePay?: boolean;
|
|
188
195
|
disableGooglePay?: boolean;
|
|
189
196
|
settlementType?: SettlementType;
|
|
197
|
+
authOnly?: boolean;
|
|
190
198
|
}
|
|
191
199
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
192
200
|
wallet: SolanaWallet;
|
|
@@ -220,7 +228,10 @@ export interface CoinflowPolygonPurchaseProps extends CoinflowEvmPurchaseProps {
|
|
|
220
228
|
export interface CoinflowEthPurchaseProps extends CoinflowEvmPurchaseProps {
|
|
221
229
|
blockchain: 'eth';
|
|
222
230
|
}
|
|
223
|
-
export
|
|
231
|
+
export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
|
|
232
|
+
blockchain: 'base';
|
|
233
|
+
}
|
|
234
|
+
export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps;
|
|
224
235
|
/** Withdraw **/
|
|
225
236
|
export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
226
237
|
onSuccess?: OnSuccessMethod;
|
|
@@ -246,15 +257,20 @@ export interface CoinflowNearWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
|
246
257
|
wallet: NearWallet;
|
|
247
258
|
blockchain: 'near';
|
|
248
259
|
}
|
|
249
|
-
export interface
|
|
250
|
-
wallet:
|
|
260
|
+
export interface CoinflowEvmWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
261
|
+
wallet: EthWallet;
|
|
262
|
+
usePermit?: boolean;
|
|
263
|
+
}
|
|
264
|
+
export interface CoinflowEthWithdrawProps extends CoinflowEvmWithdrawProps {
|
|
251
265
|
blockchain: 'eth';
|
|
252
266
|
}
|
|
253
|
-
export interface CoinflowPolygonWithdrawProps extends
|
|
254
|
-
wallet: Omit<EthWallet, 'signMessage'>;
|
|
267
|
+
export interface CoinflowPolygonWithdrawProps extends CoinflowEvmWithdrawProps {
|
|
255
268
|
blockchain: 'polygon';
|
|
256
269
|
}
|
|
257
|
-
export
|
|
270
|
+
export interface CoinflowBaseWithdrawProps extends CoinflowEvmWithdrawProps {
|
|
271
|
+
blockchain: 'base';
|
|
272
|
+
}
|
|
273
|
+
export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps;
|
|
258
274
|
export interface CommonEvmRedeem {
|
|
259
275
|
waitForHash?: boolean;
|
|
260
276
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CoinflowWithdrawProps, WithStyles } from './CoinflowTypes';
|
|
3
|
-
export declare function CoinflowWithdraw(props: CoinflowWithdrawProps & WithStyles): React.JSX.Element
|
|
3
|
+
export declare function CoinflowWithdraw(props: CoinflowWithdrawProps & WithStyles): React.JSX.Element;
|
|
@@ -13,10 +13,10 @@ export function CoinflowWithdraw(props) {
|
|
|
13
13
|
return React.createElement(EvmContent, __assign({}, props));
|
|
14
14
|
case 'eth':
|
|
15
15
|
return React.createElement(EvmContent, __assign({}, props));
|
|
16
|
+
case 'base':
|
|
17
|
+
return React.createElement(EvmContent, __assign({}, props));
|
|
16
18
|
case 'near':
|
|
17
19
|
return React.createElement(NearPurchase, __assign({}, props));
|
|
18
|
-
default:
|
|
19
|
-
return null;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
function SolanaContent(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWithdraw.js","sourceRoot":"","sources":["../src/CoinflowWithdraw.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CoinflowWithdraw.js","sourceRoot":"","sources":["../src/CoinflowWithdraw.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,EAAC,8BAA8B,EAAC,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAC,gBAAgB,EAAC,MAAM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Q,EAAE,KAAK,CAAC,EAArE,UAAU,gBAAA,EAAE,oBAAoB,0BAAqC,CAAC;IAE7E,OAAO,CACL,oBAAC,eAAe,aACd,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAC/B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,IAClC,KAAK,IACT,oBAAoB,EAAE,oBAAoB,IAC1C,CACH,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAA6C;IACjE,IAAM,QAAQ,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAA,KAAqC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAArE,UAAU,gBAAA,EAAE,oBAAoB,0BAAqC,CAAC;IAE7E,OAAO,CACL,oBAAC,eAAe,aACd,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,EACjC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,oBAAa,KAAK,CAAC,UAAU,CAAE,IAClC,KAAK,IACT,oBAAoB,EAAE,oBAAoB,IAC1C,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -12,6 +12,10 @@ export function CoinflowWithdrawHistory(props) {
|
|
|
12
12
|
return props.wallet.accountId;
|
|
13
13
|
case 'polygon':
|
|
14
14
|
return props.wallet.address;
|
|
15
|
+
case 'eth':
|
|
16
|
+
return props.wallet.address;
|
|
17
|
+
case 'base':
|
|
18
|
+
return props.wallet.address;
|
|
15
19
|
}
|
|
16
20
|
}, []);
|
|
17
21
|
return (React.createElement(CoinflowWebView, __assign({ publicKey: publicKey, WebViewRef: WebViewRef, handleIframeMessages: function () { return Promise.resolve(); }, route: "/history/withdraw/".concat(props.merchantId) }, props)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWithdrawHistory.js","sourceRoot":"","sources":["../src/CoinflowWithdrawHistory.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EA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AAQ;gBACX,OAAO,MAAA,KAAK,CAAC,MAAM,CAAC,SAAS,0CAAE,QAAQ,EAAE,CAAC;YAC5C,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;YAChC,KAAK,SAAS;gBACZ,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;YAC9B,KAAK,KAAK;gBACR,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;YAC9B,KAAK,MAAM;gBACT,OAAO,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;QAChC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,eAAe,aACd,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAM,OAAA,OAAO,CAAC,OAAO,EAAE,EAAjB,CAAiB,EAC7C,KAAK,EAAE,4BAAqB,KAAK,CAAC,UAAU,CAAE,IAC1C,KAAK,EACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -4,5 +4,5 @@ export declare class ReactNativeCoinflowUtils {
|
|
|
4
4
|
url: string;
|
|
5
5
|
constructor(env?: CoinflowEnvs);
|
|
6
6
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
7
|
-
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, tokens, webhookInfo, deviceId, chargebackProtectionData, rent, lockDefaultToken, supportsVersionedTransactions, disableApplePay, disableGooglePay, customerInfo, planCode, settlementType, lockAmount, nativeSolToConvert, theme, transactionSigner, }: CoinflowWebViewProps): string;
|
|
7
|
+
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, token, tokens, webhookInfo, deviceId, chargebackProtectionData, rent, lockDefaultToken, supportsVersionedTransactions, disableApplePay, disableGooglePay, customerInfo, planCode, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, }: CoinflowWebViewProps): string;
|
|
8
8
|
}
|
|
@@ -16,7 +16,7 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
16
16
|
return "https://".concat(env, ".coinflow.cash");
|
|
17
17
|
};
|
|
18
18
|
ReactNativeCoinflowUtils.getCoinflowUrl = function (_a) {
|
|
19
|
-
var blockchain = _a.blockchain, route = _a.route, env = _a.env, amount = _a.amount, publicKey = _a.publicKey, transaction = _a.transaction, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, token = _a.token, tokens = _a.tokens, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, supportsVersionedTransactions = _a.supportsVersionedTransactions, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, planCode = _a.planCode, settlementType = _a.settlementType, lockAmount = _a.lockAmount, nativeSolToConvert = _a.nativeSolToConvert, theme = _a.theme, transactionSigner = _a.transactionSigner;
|
|
19
|
+
var blockchain = _a.blockchain, route = _a.route, env = _a.env, amount = _a.amount, publicKey = _a.publicKey, transaction = _a.transaction, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, token = _a.token, tokens = _a.tokens, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, supportsVersionedTransactions = _a.supportsVersionedTransactions, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, planCode = _a.planCode, settlementType = _a.settlementType, lockAmount = _a.lockAmount, nativeSolToConvert = _a.nativeSolToConvert, theme = _a.theme, usePermit = _a.usePermit, transactionSigner = _a.transactionSigner, authOnly = _a.authOnly;
|
|
20
20
|
if (!publicKey)
|
|
21
21
|
return '';
|
|
22
22
|
var url = new URL("/".concat(blockchain) + route, ReactNativeCoinflowUtils.getCoinflowBaseUrl(env));
|
|
@@ -67,6 +67,10 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
67
67
|
url.searchParams.append('lockAmount', 'true');
|
|
68
68
|
if (transactionSigner)
|
|
69
69
|
url.searchParams.append('transactionSigner', transactionSigner);
|
|
70
|
+
if (usePermit === false)
|
|
71
|
+
url.searchParams.append('usePermit', 'false');
|
|
72
|
+
if (authOnly === true)
|
|
73
|
+
url.searchParams.append('authOnly', 'true');
|
|
70
74
|
return url.toString();
|
|
71
75
|
};
|
|
72
76
|
return ReactNativeCoinflowUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeCoinflowUtils.js","sourceRoot":"","sources":["../src/ReactNativeCoinflowUtils.ts"],"names":[],"mappings":"AAEA;IAIE,kCAAY,GAAkB;QAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,MAAM,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,KAAK,MAAM;YAAE,IAAI,CAAC,GAAG,GAAG,2BAA2B,CAAC;aAC3D,IAAI,IAAI,CAAC,GAAG,KAAK,OAAO;YAAE,IAAI,CAAC,GAAG,GAAG,uBAAuB,CAAC;;YAC7D,IAAI,CAAC,GAAG,GAAG,sBAAe,IAAI,CAAC,GAAG,mBAAgB,CAAC;IAC1D,CAAC;IAEM,2CAAkB,GAAzB,UAA0B,GAAkB;QAC1C,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,MAAM;YAAE,OAAO,uBAAuB,CAAC;QAC3D,IAAI,GAAG,KAAK,OAAO;YAAE,OAAO,uBAAuB,CAAC;QAEpD,OAAO,kBAAW,GAAG,mBAAgB,CAAC;IACxC,CAAC;IAEM,uCAAc,GAArB,UAAsB,
|
|
1
|
+
{"version":3,"file":"ReactNativeCoinflowUtils.js","sourceRoot":"","sources":["../src/ReactNativeCoinflowUtils.ts"],"names":[],"mappings":"AAEA;IAIE,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CAAC,CAAC;QAC5D,IAAI,UAAU;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAC9D,IAAI,iBAAiB;YACnB,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;QAElE,IAAI,SAAS,KAAK,KAAK;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACvE,IAAI,QAAQ,KAAK,IAAI;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAEnE,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IACH,+BAAC;AAAD,CAAC,AAhID,IAgIC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/react-native",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "React Native Component for Coinflow",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/react": "^18.2.64",
|
|
40
40
|
"@types/react-native": "^0.73.0",
|
|
41
41
|
"eslint-config-react-app": "^7.0.1",
|
|
42
|
-
"typescript": "^5.4.
|
|
42
|
+
"typescript": "^5.4.3",
|
|
43
43
|
"@solana/wallet-adapter-react": "^0.15.32",
|
|
44
44
|
"@near-wallet-selector/core": "^8.9.3"
|
|
45
45
|
}
|