@coinflowlabs/react-native 2.1.0 → 2.1.2
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 +4 -0
- package/build/CoinflowTypes.d.ts +2 -2
- package/build/CoinflowWebView.js +3 -1
- package/build/CoinflowWebView.js.map +1 -1
- package/build/ReactNativeCoinflowUtils.d.ts +1 -1
- package/build/ReactNativeCoinflowUtils.js +3 -3
- package/build/ReactNativeCoinflowUtils.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -37,6 +37,10 @@ Props:
|
|
|
37
37
|
* `partialSigners` (optional): Keypairs of Partial Signers to sign the transaction with, this is necessary when initializing new accounts as the new account Keypair must sign the transaction.
|
|
38
38
|
* `debugTx` (optional): Setting this to `true` will sign the transaction with the wallet, and send the transaction with no preflight checks allowing for easier debug of any issues.
|
|
39
39
|
|
|
40
|
+
## 2.1.2
|
|
41
|
+
|
|
42
|
+
- Bug fix for enhanced usage with Google Pay
|
|
43
|
+
|
|
40
44
|
## 2.1.0
|
|
41
45
|
|
|
42
46
|
- Added support for EVM NFT purchases
|
package/build/CoinflowTypes.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type CoinflowWebViewProps = Omit<CoinflowIFrameProps, 'IFrameRef'> & {
|
|
|
48
48
|
}) => Promise<void>;
|
|
49
49
|
WebViewRef: React.RefObject<WebView>;
|
|
50
50
|
onLoad?: () => void;
|
|
51
|
+
tokens?: string[];
|
|
51
52
|
bankAccountLinkRedirect?: string;
|
|
52
53
|
lockDefaultToken?: boolean;
|
|
53
54
|
supportsVersionedTransactions?: boolean;
|
|
@@ -113,7 +114,6 @@ export interface CoinflowIFrameProps {
|
|
|
113
114
|
transaction?: string;
|
|
114
115
|
blockchain: CoinflowBlockchain;
|
|
115
116
|
webhookInfo?: object;
|
|
116
|
-
token?: string | PublicKey;
|
|
117
117
|
email?: string;
|
|
118
118
|
env?: CoinflowEnvs;
|
|
119
119
|
deviceId?: string;
|
|
@@ -179,7 +179,7 @@ export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowNearPu
|
|
|
179
179
|
/** Withdraw **/
|
|
180
180
|
export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
181
181
|
onSuccess?: OnSuccessMethod;
|
|
182
|
-
|
|
182
|
+
tokens?: string[];
|
|
183
183
|
lockDefaultToken?: boolean;
|
|
184
184
|
amount?: number;
|
|
185
185
|
email?: string;
|
package/build/CoinflowWebView.js
CHANGED
|
@@ -25,8 +25,10 @@ export function CoinflowWebView(props) {
|
|
|
25
25
|
'plaid',
|
|
26
26
|
'coinflow.cash',
|
|
27
27
|
];
|
|
28
|
+
var blacklist = ['pay.google.com'];
|
|
28
29
|
var shouldRedirect = (request.url.includes('https') || request.url.includes('http')) &&
|
|
29
|
-
whitelist.some(function (item) { return request.url.includes(item); })
|
|
30
|
+
whitelist.some(function (item) { return request.url.includes(item); }) &&
|
|
31
|
+
!blacklist.some(function (item) { return request.url.includes(item); });
|
|
30
32
|
var isCurrentUrl = request.url.split('?')[0] === url.split('?')[0];
|
|
31
33
|
if (!shouldRedirect || isCurrentUrl)
|
|
32
34
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWebView.js","sourceRoot":"","sources":["../src/CoinflowWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAGpE,MAAM,UAAU,eAAe,CAAC,KAAwC;IACtE,IAAM,GAAG,GAAG,OAAO,CAAC;QAClB,OAAO,wBAAwB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEL,I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KAAK,CAAC,WAAW,CAAC,IAAI,EAAC,CAAC;YAApD,CAAoD,EAEtD,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,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,
|
|
7
|
+
static getCoinflowUrl({ blockchain, route, env, amount, publicKey, transaction, bankAccountLinkRedirect, additionalWallets, tokens, webhookInfo, deviceId, chargebackProtectionData, rent, lockDefaultToken, supportsVersionedTransactions, }: 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,
|
|
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, tokens = _a.tokens, webhookInfo = _a.webhookInfo, deviceId = _a.deviceId, chargebackProtectionData = _a.chargebackProtectionData, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, supportsVersionedTransactions = _a.supportsVersionedTransactions;
|
|
20
20
|
if (!publicKey)
|
|
21
21
|
return '';
|
|
22
22
|
var url = new URL("/".concat(blockchain) + route, ReactNativeCoinflowUtils.getCoinflowBaseUrl(env));
|
|
@@ -32,8 +32,8 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
32
32
|
}
|
|
33
33
|
if (additionalWallets)
|
|
34
34
|
url.searchParams.append('additionalWallets', JSON.stringify(additionalWallets));
|
|
35
|
-
if (
|
|
36
|
-
url.searchParams.append('
|
|
35
|
+
if (tokens)
|
|
36
|
+
url.searchParams.append('tokens', tokens.toString());
|
|
37
37
|
if (supportsVersionedTransactions) {
|
|
38
38
|
url.searchParams.append('supportsVersionedTransactions', 'true');
|
|
39
39
|
}
|
|
@@ -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,EAgBC;YAfrB,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,GAAG,SAAA,EACH,MAAM,YAAA,EACN,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,uBAAuB,6BAAA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Y,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpE,IAAI,gBAAgB;YAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;QAE1E,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IACH,+BAAC;AAAD,CAAC,AArFD,IAqFC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/react-native",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "React Native Component for Coinflow",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@solana/web3.js": "^1.87.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/react": "^18.2.
|
|
39
|
+
"@types/react": "^18.2.41",
|
|
40
40
|
"@types/react-native": "^0.72.7",
|
|
41
41
|
"eslint-config-react-app": "^7.0.1",
|
|
42
42
|
"typescript": "^5.3.2",
|