@transak/react-native-sdk
Advanced tools
Comparing version 1.0.0-beta.2 to 1.0.0
{ | ||
"name": "@transak/react-native-sdk", | ||
"version": "1.0.0-beta.2", | ||
"version": "1.0.0", | ||
"description": "A React Native SDK for decentralised applications to onboard their global user base with fiat currency", | ||
"license": "ISC", | ||
"author": "Transak Inc. <support@transak.com> (https://global.transak.com/)", | ||
"author": "Transak Inc. <support@transak.com> (https://transak.com/)", | ||
"homepage": "https://www.notion.so/transak/React-Native-c4855621543842839a2d03f3fc06df1f", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"@react-native-community/netinfo": "~9.1.0", | ||
"react": "*", | ||
"react": "^16.8.0", | ||
"react-native": "*", | ||
@@ -18,0 +18,0 @@ "react-native-inappbrowser-reborn": "~3.6.3", |
@@ -19,9 +19,9 @@ # Transak React Native SDK | ||
# Using yarn | ||
yarn add react-native-webview | ||
yarn add react-native-inappbrowser-reborn | ||
yarn add react-native-webview | ||
yarn add react-native-inappbrowser-reborn | ||
yarn add @react-native-community/netinfo | ||
# Using npm | ||
npm install react-native-webview | ||
npm install react-native-inappbrowser-reborn | ||
npm install react-native-webview | ||
npm install react-native-inappbrowser-reborn | ||
npm install @react-native-community/netinfo | ||
@@ -68,3 +68,3 @@ ``` | ||
); | ||
}; | ||
} | ||
``` | ||
@@ -77,3 +77,3 @@ | ||
| queryParams | Refer [here](https://www.notion.so/transak/Query-Parameters-9ec523df3b874ec58cef4fa3a906f238) for the full list of query params | | ||
| onTransakEventHandler | Accepts callback function to listen to order related [events](https://www.notion.so/transak/React-Native-c4855621543842839a2d03f3fc06df1f#795cde55bc0b4b30becaf50ac2dd59a2) | | ||
| onTransakEventHandler | Accepts callback function to listen to order related [events](https://www.notion.so/transak/React-Native-c4855621543842839a2d03f3fc06df1f#8370e02c6f5949348a1fe8513741f347) | | ||
@@ -80,0 +80,0 @@ This component accepts most of the [react-native-webview props](https://github.com/react-native-webview/react-native-webview/blob/HEAD/docs/Reference.md), except the following: source, injectJavaScript, sharedCookiesEnabled, injectedJavaScript, injectedJavaScriptBeforeContentLoaded |
@@ -13,40 +13,7 @@ import generateQueryString from 'query-string'; | ||
if (config && config.apiKey) { | ||
queryParams.apiKey = config.apiKey; | ||
if (config.cryptoCurrencyCode) queryParams.cryptoCurrencyCode = config.cryptoCurrencyCode; | ||
if (config.defaultCryptoCurrency) queryParams.defaultCryptoCurrency = config.defaultCryptoCurrency; | ||
if (config.walletAddress) queryParams.walletAddress = config.walletAddress; | ||
if (config.themeColor) queryParams.themeColor = config.themeColor.replace('#', ''); | ||
if (config.walletAddress) queryParams.walletAddress = config.walletAddress; | ||
if (config.fiatAmount) queryParams.fiatAmount = config.fiatAmount; | ||
if (config.defaultFiatAmount) queryParams.defaultFiatAmount = config.defaultFiatAmount; | ||
if (config.defaultCryptoAmount) queryParams.defaultCryptoAmount = config.defaultCryptoAmount; | ||
if (config.walletAddressesData && (config.walletAddressesData.networks || config.walletAddressesData.coins)) { | ||
queryParams.walletAddressesData = {}; | ||
if (config.walletAddressesData.networks) queryParams.walletAddressesData.networks = config.walletAddressesData.networks; | ||
if (config.walletAddressesData.coins) queryParams.walletAddressesData.coins = config.walletAddressesData.coins; | ||
queryParams.walletAddressesData = JSON.stringify(queryParams.walletAddressesData); | ||
} | ||
if (config.fiatCurrency) queryParams.fiatCurrency = config.fiatCurrency; | ||
if (config.countryCode) queryParams.countryCode = config.countryCode; | ||
if (config.paymentMethod) queryParams.paymentMethod = config.paymentMethod; | ||
if (config.defaultPaymentMethod) queryParams.defaultPaymentMethod = config.defaultPaymentMethod; | ||
if (config.isAutoFillUserData) queryParams.isAutoFillUserData = config.isAutoFillUserData; | ||
if (config.isFeeCalculationHidden) queryParams.isFeeCalculationHidden = config.isFeeCalculationHidden; | ||
if (config.disablePaymentMethods) queryParams.disablePaymentMethods = config.disablePaymentMethods; | ||
if (config.email) queryParams.email = config.email; | ||
if (config.userData) queryParams.userData = JSON.stringify(config.userData) | ||
if (config.partnerOrderId) queryParams.partnerOrderId = config.partnerOrderId; | ||
if (config.partnerCustomerId) queryParams.partnerCustomerId = config.partnerCustomerId; | ||
if (config.exchangeScreenTitle) queryParams.exchangeScreenTitle = config.exchangeScreenTitle; | ||
if (config.hideMenu) queryParams.hideMenu = config.hideMenu; | ||
if (config.accessToken) queryParams.accessToken = config.accessToken; | ||
if (config.hideExchangeScreen) queryParams.hideExchangeScreen = config.hideExchangeScreen; | ||
if (config.isDisableCrypto) queryParams.isDisableCrypto = config.isDisableCrypto; | ||
if (config.redirectURL) queryParams.redirectURL = config.redirectURL; | ||
if (config.hostURL) queryParams.hostURL = (config.hostURL ? config.hostURL : window.location.origin); | ||
if (config.disableWalletAddressForm) queryParams.disableWalletAddressForm = config.disableWalletAddressForm; | ||
if (config.cryptoCurrencyList) queryParams.cryptoCurrencyList = config.cryptoCurrencyList.split(','); | ||
if (config.networks) queryParams.networks = config.networks.split(','); | ||
if (config.defaultNetwork) queryParams.defaultNetwork = config.defaultNetwork; | ||
if (config.network) queryParams.network = config.network; | ||
Object.keys(config).map((key) => { | ||
if (config[key] instanceof Object) { | ||
queryParams[key] = JSON.stringify(config[key]); | ||
} else queryParams[key] = config[key]; | ||
}); | ||
@@ -60,1 +27,2 @@ queryString = generateQueryString.stringify(queryParams, { arrayFormat: 'comma' }); | ||
export { generateUrl }; | ||
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
8219
110
1