Skip to content

Commit

Permalink
Merge pull request #571 from torusresearch/develop
Browse files Browse the repository at this point in the history
Release v4.1.0
  • Loading branch information
chaitanyapotti authored Dec 14, 2023
2 parents 377210c + 0bbda94 commit 7c79ac2
Show file tree
Hide file tree
Showing 8 changed files with 2,159 additions and 2,433 deletions.
1,723 changes: 586 additions & 1,137 deletions examples/vue-app/package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions examples/vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,41 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@metamask/eth-sig-util": "^6.0.0",
"@metamask/eth-sig-util": "^7.0.1",
"@toruslabs/torus-embed": "file:../../",
"autoprefixer": "^10",
"core-js": "^3.32.1",
"core-js": "^3.34.0",
"human-standard-token-abi": "^2.0.0",
"vue": "^3.3.4",
"web3": "^4.1.1"
"vue": "^3.3.11",
"web3": "^4.3.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-plugin-typescript": "~5.0.8",
"@vue/cli-service": "^5.0.8",
"@vue/eslint-config-typescript": "^11.0.3",
"assert": "^2.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"assert": "^2.1.0",
"autoprefixer": "^10.4.14",
"crypto-browserify": "^3.12.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.17.0",
"eslint-plugin-vue": "^9.19.2",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"postcss": "^8.4.29",
"prettier": "^3.0.3",
"postcss": "^8.4.32",
"prettier": "^3.1.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tailwindcss": "^3.3.3",
"typescript": "~5.2.2",
"url": "^0.11.1",
"tailwindcss": "^3.3.6",
"typescript": "~5.3.3",
"url": "^0.11.3",
"vue-cli-plugin-tailwind": "~3.0.0",
"vue-template-compiler": "^2.7.14"
"vue-template-compiler": "^2.7.15"
},
"postcss": {
"plugins": {
Expand Down
2,692 changes: 1,535 additions & 1,157 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,34 @@
"@babel/runtime": "7.x"
},
"dependencies": {
"@metamask/rpc-errors": "^6.0.0",
"@toruslabs/http-helpers": "^5.0.0",
"@toruslabs/openlogin-jrpc": "^5.0.2",
"@metamask/rpc-errors": "^6.1.0",
"@toruslabs/http-helpers": "^6.0.0",
"@toruslabs/openlogin-jrpc": "^6.1.0",
"fast-deep-equal": "^3.1.3",
"lodash.merge": "^4.6.2",
"loglevel": "^1.8.1",
"pump": "^3.0.0",
"readable-stream": "^4.4.2"
},
"devDependencies": {
"@babel/runtime": "^7.22.15",
"@rollup/plugin-replace": "^5.0.2",
"@babel/runtime": "^7.23.6",
"@rollup/plugin-replace": "^5.0.5",
"@toruslabs/config": "^2.0.2",
"@toruslabs/eslint-config-typescript": "^3.0.1",
"@toruslabs/torus-scripts": "^5.0.4",
"@types/lodash.merge": "^4.6.7",
"@toruslabs/eslint-config-typescript": "^3.0.3",
"@toruslabs/torus-scripts": "^5.1.0",
"@types/lodash.merge": "^4.6.9",
"@types/node": "^20",
"@types/pump": "^1.1.1",
"@types/readable-stream": "^4.0.2",
"@types/pump": "^1.1.3",
"@types/readable-stream": "^4.0.10",
"cross-env": "^7.0.3",
"eslint": "^8.48.0",
"eslint": "^8.55.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"lint-staged": "^15.2.0",
"mocha": "^10.2.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
"prettier": "^3.1.1",
"rimraf": "^5.0.5",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"mocha": {
"timeout": 0
Expand Down
61 changes: 0 additions & 61 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,47 +50,6 @@ const paymentProviders = {
api: true,
enforceMax: false,
} as IPaymentProvider,
[PAYMENT_PROVIDER.WYRE]: {
line1: "Apple Pay/ Debit/ Credit Card",
line2: "4.9% + 30¢ or 5 USD",
line3: "$250/day",
supportPage: "https://support.sendwyre.com/en/",
minOrderValue: 5,
maxOrderValue: 500,
validCurrencies: supportedFiatCurrencies(PAYMENT_PROVIDER.WYRE),
validCryptoCurrenciesByChain: {
[SUPPORTED_PAYMENT_NETWORK.MAINNET]: [
{ value: "AAVE", display: "AAVE" },
{ value: "COMP", display: "COMP" },
{ value: "BAT", display: "BAT" },
{ value: "BUSD", display: "BUSD" },
{ value: "DAI", display: "DAI" },
{ value: "ETH", display: "ETH" },
{ value: "WBTC", display: "WBTC" },
{ value: "MKR", display: "MKR" },
{ value: "UNI", display: "UNI" },
{ value: "WETH", display: "WETH" },
{ value: "USDC", display: "USDC" },
{ value: "USDT", display: "USDT" },
],
[SUPPORTED_PAYMENT_NETWORK.MATIC]: [
{ value: "mUSDC", display: "USDC" },
{ value: "MATIC", display: "MATIC" },
{ value: "MWETH", display: "WETH" },
],
[SUPPORTED_PAYMENT_NETWORK.AVALANCHE_MAINNET]: [
{ value: "AVAXC", display: "AVAX" },
{ value: "AVAXCUSDC", display: "USDC" },
],
[SUPPORTED_PAYMENT_NETWORK.BSC_MAINNET]: [
{ value: "BNB", display: "BNB" },
{ value: "BBUSD", display: "BUSD" },
],
},
includeFees: false,
api: true,
enforceMax: false,
} as IPaymentProvider,
[PAYMENT_PROVIDER.RAMPNETWORK]: {
line1: "Debit Card/ <br>Apple Pay/ Bank transfer",
line2: "0.49% - 2.9%",
Expand Down Expand Up @@ -140,26 +99,6 @@ const paymentProviders = {
receiveHint: "walletTopUp.receiveHintRamp",
enforceMax: false,
} as IPaymentProvider,
[PAYMENT_PROVIDER.XANPOOL]: {
line1: "PayNow/ InstaPay/ FPS/ GoJekPay/ UPI/ PromptPay/ <br>ViettelPay/ DuitNow",
line2: "2.5% buying, 3% selling",
line3: "$2,500 / day",
supportPage: "mailto:[email protected]",
minOrderValue: 100,
maxOrderValue: 2500,
validCurrencies: supportedFiatCurrencies(PAYMENT_PROVIDER.XANPOOL),
validCryptoCurrenciesByChain: {
[SUPPORTED_PAYMENT_NETWORK.MAINNET]: [
{ value: "ETH", display: "ETH" },
{ value: "USDT", display: "USDT" },
{ value: "USDC", display: "USDC" },
],
},
includeFees: true,
api: true,
sell: true,
enforceMax: false,
} as IPaymentProvider,
[PAYMENT_PROVIDER.MERCURYO]: {
line1: "Credit/ Debit Card/ Apple Pay",
line2: "3.95% or 4 USD",
Expand Down
2 changes: 0 additions & 2 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export const WALLET_OPENLOGIN_VERIFIER_MAP = {

export const PAYMENT_PROVIDER = {
MOONPAY: "moonpay",
WYRE: "wyre",
RAMPNETWORK: "rampnetwork",
XANPOOL: "xanpool",
MERCURYO: "mercuryo",
TRANSAK: "transak",
BANXA: "banxa",
Expand Down
38 changes: 0 additions & 38 deletions src/supportedCurrencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,42 +343,6 @@ const PROVIDER_SUPPORTED_FIAT_CURRENCIES = {
"VND",
"ZAR",
],
/**
* https://docs.sendwyre.com/docs/supported-currencies#fiat
* The ones where credit card is supported
*/
[PAYMENT_PROVIDER.WYRE]: [
"USD",
"EUR",
"GBP",
"AUD",
"CAD",
"NZD",
"CNY",
"ARS",
"BRL",
"CHF",
"CLP",
"COP",
"CZK",
"DKK",
"HKD",
"ILS",
"INR",
"ISK",
"JPY",
"KRW",
"MXN",
"MYR",
"NOK",
"PHP",
"PLN",
"SEK",
"SGD",
"THB",
"VND",
"ZAR",
],
// https://support.ramp.network/en/articles/471-supported-fiat-currencies
[PAYMENT_PROVIDER.RAMPNETWORK]: [
"USD",
Expand Down Expand Up @@ -426,8 +390,6 @@ const PROVIDER_SUPPORTED_FIAT_CURRENCIES = {
"THB",
"UYU",
],
// From https://xanpool.com/ fiat select dropdown
[PAYMENT_PROVIDER.XANPOOL]: ["SGD", "HKD", "THB", "PHP", "INR", "IDR", "MYR", "AUD", "NZD", "KRW"],
// https://help.mercuryo.io/en/articles/6121246-which-fiat-currencies-are-supported
// RUB / UAH currently not supported
[PAYMENT_PROVIDER.MERCURYO]: [
Expand Down
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ export function getPopupFeatures(): string {
const width = window.innerWidth
? window.innerWidth
: document.documentElement.clientWidth
? document.documentElement.clientWidth
: window.screen.width;
? document.documentElement.clientWidth
: window.screen.width;

const height = window.innerHeight
? window.innerHeight
: document.documentElement.clientHeight
? document.documentElement.clientHeight
: window.screen.height;
? document.documentElement.clientHeight
: window.screen.height;

const systemZoom = 1; // No reliable estimate

Expand Down

0 comments on commit 7c79ac2

Please sign in to comment.