@coinflowlabs/react-native 1.0.0 → 1.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/build/CoinflowPurchase.d.ts +2 -2
- package/build/CoinflowPurchaseHistory.d.ts +2 -2
- package/build/CoinflowTypes.d.ts +2 -0
- package/build/CoinflowWebView.d.ts +2 -2
- package/build/CoinflowWebView.js +2 -6
- package/build/CoinflowWebView.js.map +1 -1
- package/build/CoinflowWithdraw.d.ts +2 -2
- package/build/CoinflowWithdrawHistory.d.ts +2 -2
- package/build/ReactNativeCoinflowUtils.d.ts +2 -1
- package/build/ReactNativeCoinflowUtils.js +4 -1
- package/build/ReactNativeCoinflowUtils.js.map +1 -1
- package/package.json +4 -4
|
@@ -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): JSX.Element | null;
|
|
3
|
+
export declare function CoinflowPurchase(props: CoinflowPurchaseProps & WithStyles): React.JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CoinflowHistoryProps, WithStyles } from './CoinflowTypes';
|
|
3
|
-
export declare function CoinflowPurchaseHistory(props: CoinflowHistoryProps & WithStyles): JSX.Element;
|
|
3
|
+
export declare function CoinflowPurchaseHistory(props: CoinflowHistoryProps & WithStyles): React.JSX.Element;
|
package/build/CoinflowTypes.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export type CoinflowWebViewProps = Omit<CoinflowIFrameProps, 'IFrameRef'> & {
|
|
|
24
24
|
}) => Promise<void>;
|
|
25
25
|
WebViewRef: React.RefObject<WebView>;
|
|
26
26
|
onLoad?: () => void;
|
|
27
|
+
bankAccountLinkRedirect?: string;
|
|
27
28
|
};
|
|
28
29
|
export type WithStyles = {
|
|
29
30
|
style?: StyleProp<ViewStyle>;
|
|
@@ -151,6 +152,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
151
152
|
token?: string;
|
|
152
153
|
amount?: number;
|
|
153
154
|
email?: string;
|
|
155
|
+
bankAccountLinkRedirect?: string;
|
|
154
156
|
}
|
|
155
157
|
export interface CoinflowSolanaWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
156
158
|
wallet: SolanaWallet;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CoinflowWebViewProps, WithStyles } from './CoinflowTypes';
|
|
3
|
-
export declare function CoinflowWebView(props: CoinflowWebViewProps & WithStyles): JSX.Element | null;
|
|
3
|
+
export declare function CoinflowWebView(props: CoinflowWebViewProps & WithStyles): React.JSX.Element | null;
|
package/build/CoinflowWebView.js
CHANGED
|
@@ -16,12 +16,8 @@ export function CoinflowWebView(props) {
|
|
|
16
16
|
},
|
|
17
17
|
style,
|
|
18
18
|
], keyboardDisplayRequiresUserAction: false, showsVerticalScrollIndicator: false, onShouldStartLoadWithRequest: function (request) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Linking.openURL(request.url).catch();
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
return true;
|
|
19
|
+
Linking.openURL(request.url).catch();
|
|
20
|
+
return false;
|
|
25
21
|
}, ref: WebViewRef, source: { uri: url }, onMessage: function (event) {
|
|
26
22
|
return handleIframeMessages({ data: event.nativeEvent.data });
|
|
27
23
|
}, onLoad: onLoad }));
|
|
@@ -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,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MAAM,GAAI,KAAK,OAAT,CAAU;IAChE,OAAO,OAAO,CAAC;QACb,IAAI,CAAC,KAAK,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAElC,OAAO,CACL,oBAAC,OAAO,IACN,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,CAAC;iBACR;gBACD,KAAK;aACN,EACD,iCAAiC,EAAE,KAAK,EACxC,4BAA4B,EAAE,KAAK,EACnC,4BAA4B,EAAE,UAAA,OAAO;gBACnC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;gBACrC,OAAO,KAAK,CAAC;YACf,CAAC,EACD,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,EAClB,SAAS,EAAE,UAAA,KAAK;gBACd,OAAA,oBAAoB,CAAC,EAAC,IAAI,EAAE,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"}
|
|
@@ -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): JSX.Element | null;
|
|
3
|
+
export declare function CoinflowWithdraw(props: CoinflowWithdrawProps & WithStyles): React.JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CoinflowHistoryProps, WithStyles } from './CoinflowTypes';
|
|
3
|
-
export declare function CoinflowWithdrawHistory(props: CoinflowHistoryProps & WithStyles): JSX.Element;
|
|
3
|
+
export declare function CoinflowWithdrawHistory(props: CoinflowHistoryProps & WithStyles): React.JSX.Element;
|
|
@@ -4,11 +4,12 @@ export declare class ReactNativeCoinflowUtils {
|
|
|
4
4
|
url: string;
|
|
5
5
|
constructor(env?: CoinflowEnvs);
|
|
6
6
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
7
|
-
static getCoinflowUrl({ route, env, amount, publicKey, transaction, }: {
|
|
7
|
+
static getCoinflowUrl({ route, env, amount, publicKey, transaction, bankAccountLinkRedirect, }: {
|
|
8
8
|
route: string;
|
|
9
9
|
publicKey: string | null | undefined;
|
|
10
10
|
env?: CoinflowEnvs;
|
|
11
11
|
amount?: number;
|
|
12
12
|
transaction?: string;
|
|
13
|
+
bankAccountLinkRedirect?: string;
|
|
13
14
|
}): string;
|
|
14
15
|
}
|
|
@@ -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 route = _a.route, env = _a.env, amount = _a.amount, publicKey = _a.publicKey, transaction = _a.transaction;
|
|
19
|
+
var route = _a.route, env = _a.env, amount = _a.amount, publicKey = _a.publicKey, transaction = _a.transaction, bankAccountLinkRedirect = _a.bankAccountLinkRedirect;
|
|
20
20
|
if (!publicKey)
|
|
21
21
|
return '';
|
|
22
22
|
var url = new URL(route, ReactNativeCoinflowUtils.getCoinflowBaseUrl(env));
|
|
@@ -27,6 +27,9 @@ var ReactNativeCoinflowUtils = /** @class */ (function () {
|
|
|
27
27
|
if (amount) {
|
|
28
28
|
url.searchParams.append('amount', amount.toString());
|
|
29
29
|
}
|
|
30
|
+
if (bankAccountLinkRedirect) {
|
|
31
|
+
url.searchParams.append('bankAccountLinkRedirect', bankAccountLinkRedirect);
|
|
32
|
+
}
|
|
30
33
|
return url.toString();
|
|
31
34
|
};
|
|
32
35
|
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,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,EAcrB;YAbC,KAAK,WAAA,EACL,GAAG,SAAA,EACH,MAAM,YAAA,EACN,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,uBAAuB,6BAAA;QASvB,IAAI,CAAC,SAAS;YAAE,OAAO,EAAE,CAAC;QAE1B,IAAM,GAAG,GAAG,IAAI,GAAG,CACjB,KAAK,EACL,wBAAwB,CAAC,kBAAkB,CAAC,GAAG,CAAC,CACjD,CAAC;QACF,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAE7C,IAAI,WAAW,EAAE;YACf,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;SACrD;QACD,IAAI,MAAM,EAAE;YACV,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;SACtD;QACD,IAAI,uBAAuB,EAAE;YAC3B,GAAG,CAAC,YAAY,CAAC,MAAM,CACrB,yBAAyB,EACzB,uBAAuB,CACxB,CAAC;SACH;QACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IACH,+BAAC;AAAD,CAAC,AAvDD,IAuDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinflowlabs/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "React Native Component for Coinflow",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"react-native-get-random-values": "^1.
|
|
39
|
+
"react-native-get-random-values": "^1.9.0",
|
|
40
40
|
"bs58": "^5.0.0",
|
|
41
41
|
"bn.js": "^5.2.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/react": "^18.2.
|
|
45
|
-
"@types/react-native": "^0.
|
|
44
|
+
"@types/react": "^18.2.8",
|
|
45
|
+
"@types/react-native": "^0.72.2",
|
|
46
46
|
"eslint-config-react-app": "^7.0.1",
|
|
47
47
|
"typescript": "^5.0.4",
|
|
48
48
|
"@solana/wallet-adapter-react": "^0.15.32"
|