Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mwa andoroid + upgrade coinbase sdk #111

Merged
merged 12 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['@babel/plugin-proposal-nullish-coalescing-operator'],
};
9 changes: 8 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
const { defineConfig } = require('cypress')
const webpack = require('@cypress/webpack-preprocessor')

module.exports = defineConfig({
"video": false,
"e2e": {
"specPattern": "cypress/e2e/**/*.{js,jsx,ts,tsx}"
"specPattern": "cypress/e2e/**/*.{js,jsx,ts,tsx}",
setupNodeEvents(on, config) {
const options = {
webpackOptions: require('./webpack.config.js'),
};
on('file:preprocessor', webpack(options));
},
}
})
2 changes: 1 addition & 1 deletion cypress/e2e/bundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Blockchains from '@depay/web3-blockchains'
import DePayWidgets from '../../dist/umd/index.bundle'
import DePayWidgets from '../../dist/esm/index.bundle'
import fetch from 'cross-fetch'
import fetchMock from 'fetch-mock'
import mockBasics from '../../tests/mocks/evm/basics'
Expand Down
6 changes: 3 additions & 3 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/coinbase-wallet-sdk@3"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/walletconnect-v1@1"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/walletconnect-v2@2"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/[email protected].6"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/[email protected].8"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/[email protected]"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/[email protected]"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-payments@13"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-payments@13.6.10"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/qr-code-styling@1"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/fuse.js@6"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-rangeslider@2/umd/rangeslider.js"></script>
Expand Down Expand Up @@ -287,7 +287,7 @@ <h5 class="px-4">Payment: multichain</h5>
blockchain: 'solana',
amount: 0.0001,
token: '11111111111111111111111111111111',
receiver: '2UgCJaHU5y8NC4uWQcZYeV9a5RyYLF7iKYCybCsdFFD1'
receiver: '5AcFMJZkXo14r3Hj99iYd1HScPiM4hAcLZf552DfZkxa'
},
]
});
Expand Down
73 changes: 37 additions & 36 deletions dist/esm/index.bundle.js

Large diffs are not rendered by default.

37 changes: 21 additions & 16 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ var allWallets = [{
"mobile": {
"ios": {
"native": "phantom:",
"universal": "https://phantom.app/ul",
"open": function open() {
return "https://phantom.app/ul/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
},
Expand All @@ -127,7 +126,6 @@ var allWallets = [{
},
"android": {
"native": "phantom:",
"universal": "https://phantom.app/ul",
"connect": "SolanaMobileWalletAdapter",
"qr": function qr() {
return "phantom://browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
Expand Down Expand Up @@ -283,6 +281,12 @@ var allWallets = [{
"universal": "https://uniswap.org/app",
"connect": "WalletConnectV2",
"qr": "WalletConnectV2"
},
"android": {
"native": "uniswap:",
"universal": "https://uniswap.org/app",
"connect": "WalletConnectV2",
"qr": "WalletConnectV2"
}
},
"logo": "https://img1.depay.com/wallets/uniswap_wallet.jpg",
Expand Down Expand Up @@ -22507,14 +22511,14 @@ var ConnectWalletDialog = (function (props) {
style: {
width: "50px"
}
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
}, /*#__PURE__*/React.createElement("div", {
className: "Loading Icon medium",
style: {
position: 'relative',
top: '4px',
left: '1px'
position: 'relative'
}
})), /*#__PURE__*/React.createElement("div", {
}))), /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftS LineHeightXS"
}, /*#__PURE__*/React.createElement("div", {
className: "CardText FontWeightMedium"
Expand Down Expand Up @@ -22554,14 +22558,14 @@ var ConnectWalletDialog = (function (props) {
style: {
width: "50px"
}
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
}, /*#__PURE__*/React.createElement("div", {
className: "Loading Icon medium",
style: {
position: 'relative',
top: '2px',
left: '0px'
position: 'relative'
}
})), /*#__PURE__*/React.createElement("div", {
}))), /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftS LineHeightXS"
}, /*#__PURE__*/React.createElement("div", {
className: "CardText FontWeightMedium"
Expand Down Expand Up @@ -23072,7 +23076,9 @@ var SelectWalletDialog = (function (props) {
className: "PaddingBottomXS PaddingLeftS PaddingRightS"
}, detectedWallets.filter(function (wallet, index, array) {
return array.findIndex(function (target) {
return target.info.name === wallet.info.name;
var _target$info, _wallet$info;

return (target === null || target === void 0 ? void 0 : (_target$info = target.info) === null || _target$info === void 0 ? void 0 : _target$info.name) === (wallet === null || wallet === void 0 ? void 0 : (_wallet$info = wallet.info) === null || _wallet$info === void 0 ? void 0 : _wallet$info.name);
}) === index;
}).map(function (wallet, index) {
var walletMetaData = allWallets.find(function (walletFromList) {
Expand Down Expand Up @@ -27287,9 +27293,9 @@ var ChangePaymentDialog = (function (props) {
}, "Payment options"), displayedPaymentValue != undefined && /*#__PURE__*/React.createElement("div", {
className: "FontSizeL TextCenter FontWeightBold"
}, /*#__PURE__*/React.createElement("strong", null, displayedPaymentValue.toString())), /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
className: "PaddingTopS"
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS PaddingBottomXS TextLeft",
className: "TextLeft",
style: {
height: "32px"
}
Expand Down Expand Up @@ -27380,12 +27386,11 @@ var ChangePaymentDialog = (function (props) {
return onChangeSearch(event, fuse, allPaymentOptions);
}
}))))),
bodyClassName: "ScrollHeight",
bodyRef: listElement,
body: /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS PaddingBottomS"
className: "ScrollHeight PaddingTopXS PaddingBottomS"
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftM PaddingRightM"
className: "PaddingLeftM PaddingRightM PaddingBottomM"
}, displayedPaymentOptions, displayedPaymentOptions.length === 0 && /*#__PURE__*/React.createElement("div", {
className: "TextCenter Opacity05 PaddingTopS PaddingBottomS"
}, /*#__PURE__*/React.createElement("strong", null, "Nothing found for the given search term."), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("strong", null, "Please search for something else.")))),
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js.map

Large diffs are not rendered by default.

37 changes: 21 additions & 16 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ var allWallets = [{
"mobile": {
"ios": {
"native": "phantom:",
"universal": "https://phantom.app/ul",
"open": function open() {
return "https://phantom.app/ul/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
},
Expand All @@ -129,7 +128,6 @@ var allWallets = [{
},
"android": {
"native": "phantom:",
"universal": "https://phantom.app/ul",
"connect": "SolanaMobileWalletAdapter",
"qr": function qr() {
return "phantom://browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
Expand Down Expand Up @@ -285,6 +283,12 @@ var allWallets = [{
"universal": "https://uniswap.org/app",
"connect": "WalletConnectV2",
"qr": "WalletConnectV2"
},
"android": {
"native": "uniswap:",
"universal": "https://uniswap.org/app",
"connect": "WalletConnectV2",
"qr": "WalletConnectV2"
}
},
"logo": "https://img1.depay.com/wallets/uniswap_wallet.jpg",
Expand Down Expand Up @@ -22509,14 +22513,14 @@ var ConnectWalletDialog = (function (props) {
style: {
width: "50px"
}
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
}, /*#__PURE__*/React.createElement("div", {
className: "Loading Icon medium",
style: {
position: 'relative',
top: '4px',
left: '1px'
position: 'relative'
}
})), /*#__PURE__*/React.createElement("div", {
}))), /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftS LineHeightXS"
}, /*#__PURE__*/React.createElement("div", {
className: "CardText FontWeightMedium"
Expand Down Expand Up @@ -22556,14 +22560,14 @@ var ConnectWalletDialog = (function (props) {
style: {
width: "50px"
}
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
}, /*#__PURE__*/React.createElement("div", {
className: "Loading Icon medium",
style: {
position: 'relative',
top: '2px',
left: '0px'
position: 'relative'
}
})), /*#__PURE__*/React.createElement("div", {
}))), /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftS LineHeightXS"
}, /*#__PURE__*/React.createElement("div", {
className: "CardText FontWeightMedium"
Expand Down Expand Up @@ -23074,7 +23078,9 @@ var SelectWalletDialog = (function (props) {
className: "PaddingBottomXS PaddingLeftS PaddingRightS"
}, detectedWallets.filter(function (wallet, index, array) {
return array.findIndex(function (target) {
return target.info.name === wallet.info.name;
var _target$info, _wallet$info;

return (target === null || target === void 0 ? void 0 : (_target$info = target.info) === null || _target$info === void 0 ? void 0 : _target$info.name) === (wallet === null || wallet === void 0 ? void 0 : (_wallet$info = wallet.info) === null || _wallet$info === void 0 ? void 0 : _wallet$info.name);
}) === index;
}).map(function (wallet, index) {
var walletMetaData = allWallets.find(function (walletFromList) {
Expand Down Expand Up @@ -27250,9 +27256,9 @@ var ChangePaymentDialog = (function (props) {
}, "Payment options"), displayedPaymentValue != undefined && /*#__PURE__*/React.createElement("div", {
className: "FontSizeL TextCenter FontWeightBold"
}, /*#__PURE__*/React.createElement("strong", null, displayedPaymentValue.toString())), /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
className: "PaddingTopS"
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS PaddingBottomXS TextLeft",
className: "TextLeft",
style: {
height: "32px"
}
Expand Down Expand Up @@ -27343,12 +27349,11 @@ var ChangePaymentDialog = (function (props) {
return onChangeSearch(event, fuse, allPaymentOptions);
}
}))))),
bodyClassName: "ScrollHeight",
bodyRef: listElement,
body: /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS PaddingBottomS"
className: "ScrollHeight PaddingTopXS PaddingBottomS"
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftM PaddingRightM"
className: "PaddingLeftM PaddingRightM PaddingBottomM"
}, displayedPaymentOptions, displayedPaymentOptions.length === 0 && /*#__PURE__*/React.createElement("div", {
className: "TextCenter Opacity05 PaddingTopS PaddingBottomS"
}, /*#__PURE__*/React.createElement("strong", null, "Nothing found for the given search term."), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("strong", null, "Please search for something else.")))),
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

37 changes: 21 additions & 16 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ var allWallets = [{
"mobile": {
"ios": {
"native": "phantom:",
"universal": "https://phantom.app/ul",
"open": function open() {
return "https://phantom.app/ul/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
},
Expand All @@ -128,7 +127,6 @@ var allWallets = [{
},
"android": {
"native": "phantom:",
"universal": "https://phantom.app/ul",
"connect": "SolanaMobileWalletAdapter",
"qr": function qr() {
return "phantom://browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
Expand Down Expand Up @@ -284,6 +282,12 @@ var allWallets = [{
"universal": "https://uniswap.org/app",
"connect": "WalletConnectV2",
"qr": "WalletConnectV2"
},
"android": {
"native": "uniswap:",
"universal": "https://uniswap.org/app",
"connect": "WalletConnectV2",
"qr": "WalletConnectV2"
}
},
"logo": "https://img1.depay.com/wallets/uniswap_wallet.jpg",
Expand Down Expand Up @@ -22508,14 +22512,14 @@ var ConnectWalletDialog = (function (props) {
style: {
width: "50px"
}
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
}, /*#__PURE__*/React.createElement("div", {
className: "Loading Icon medium",
style: {
position: 'relative',
top: '4px',
left: '1px'
position: 'relative'
}
})), /*#__PURE__*/React.createElement("div", {
}))), /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftS LineHeightXS"
}, /*#__PURE__*/React.createElement("div", {
className: "CardText FontWeightMedium"
Expand Down Expand Up @@ -22555,14 +22559,14 @@ var ConnectWalletDialog = (function (props) {
style: {
width: "50px"
}
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
}, /*#__PURE__*/React.createElement("div", {
className: "Loading Icon medium",
style: {
position: 'relative',
top: '2px',
left: '0px'
position: 'relative'
}
})), /*#__PURE__*/React.createElement("div", {
}))), /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftS LineHeightXS"
}, /*#__PURE__*/React.createElement("div", {
className: "CardText FontWeightMedium"
Expand Down Expand Up @@ -23073,7 +23077,9 @@ var SelectWalletDialog = (function (props) {
className: "PaddingBottomXS PaddingLeftS PaddingRightS"
}, detectedWallets.filter(function (wallet, index, array) {
return array.findIndex(function (target) {
return target.info.name === wallet.info.name;
var _target$info, _wallet$info;

return (target === null || target === void 0 ? void 0 : (_target$info = target.info) === null || _target$info === void 0 ? void 0 : _target$info.name) === (wallet === null || wallet === void 0 ? void 0 : (_wallet$info = wallet.info) === null || _wallet$info === void 0 ? void 0 : _wallet$info.name);
}) === index;
}).map(function (wallet, index) {
var walletMetaData = allWallets.find(function (walletFromList) {
Expand Down Expand Up @@ -27288,9 +27294,9 @@ var ChangePaymentDialog = (function (props) {
}, "Payment options"), displayedPaymentValue != undefined && /*#__PURE__*/React.createElement("div", {
className: "FontSizeL TextCenter FontWeightBold"
}, /*#__PURE__*/React.createElement("strong", null, displayedPaymentValue.toString())), /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS"
className: "PaddingTopS"
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS PaddingBottomXS TextLeft",
className: "TextLeft",
style: {
height: "32px"
}
Expand Down Expand Up @@ -27381,12 +27387,11 @@ var ChangePaymentDialog = (function (props) {
return onChangeSearch(event, fuse, allPaymentOptions);
}
}))))),
bodyClassName: "ScrollHeight",
bodyRef: listElement,
body: /*#__PURE__*/React.createElement("div", {
className: "PaddingTopXS PaddingBottomS"
className: "ScrollHeight PaddingTopXS PaddingBottomS"
}, /*#__PURE__*/React.createElement("div", {
className: "PaddingLeftM PaddingRightM"
className: "PaddingLeftM PaddingRightM PaddingBottomM"
}, displayedPaymentOptions, displayedPaymentOptions.length === 0 && /*#__PURE__*/React.createElement("div", {
className: "TextCenter Opacity05 PaddingTopS PaddingBottomS"
}, /*#__PURE__*/React.createElement("strong", null, "Nothing found for the given search term."), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("strong", null, "Please search for something else.")))),
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.solana.js.map

Large diffs are not rendered by default.

Loading
Loading