Skip to content

Commit

Permalink
test dev debug (#15)
Browse files Browse the repository at this point in the history
* test dev debug

* debug demo

* isPhantomInstalled

* debug window.isPhantomInstalled

* window.isPhantomInstalled

* window.isPhantomInstalled

* more debug

* window solana wallet

* debug error

* debug

* more debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* debug

* remove some debugging

* debug phantom

* glow is not phantom

* glow is not phantom

* demo 1

* more glow debug

* more debug

* v15.11.2: solana wallet fixes
  • Loading branch information
10xSebastian authored Jun 6, 2023
1 parent 2d744a3 commit 745f5b5
Show file tree
Hide file tree
Showing 17 changed files with 308 additions and 272 deletions.
15 changes: 14 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,19 @@ <h5 class="px-4">getWallets()</h5>
</div>
</div>
<div class="px-4 pt-3">
<button class='btn btn-primary' onClick='Web3Wallets.getWallets().then(console.log)'>Try it</button>
<button class='btn btn-primary' onClick='Web3Wallets.getWallets().then((wallets)=>{
// alert(2)
// alert(wallets.map((w)=>w.name))
// alert(window.glow)
// alert(window.glowSolana)
// alert(window.phantom)
// alert(window.phantom.solana)
// alert(Object.keys(window))
// alert(Object.keys(window.phantom))
// alert(Object.keys(window.phantom.solana))
// alert(Object.keys(window.solana))
console.log(wallets)
})'>Try it</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -89,6 +101,7 @@ <h5 class="px-4">wallet.connect()</h5>
let accounts = await wallet.connect()
window.wallet = wallet
console.log(accounts)
alert(accounts)
}
</script>
</div>
Expand Down
89 changes: 46 additions & 43 deletions dist/esm/index.evm.js

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions dist/esm/index.js

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions dist/esm/index.solana.js

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions dist/umd/index.evm.js

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions dist/umd/index.js

Large diffs are not rendered by default.

89 changes: 46 additions & 43 deletions dist/umd/index.solana.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-evm",
"moduleName": "Web3Wallets",
"version": "15.11.1",
"version": "15.11.2",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets",
"moduleName": "Web3Wallets",
"version": "15.11.1",
"version": "15.11.2",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-solana",
"moduleName": "Web3Wallets",
"version": "15.11.1",
"version": "15.11.2",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand Down
1 change: 1 addition & 0 deletions rollup.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default Object.assign({}, rollup, {
],
plugins: [...rollup.plugins,
serve({
host: '0.0.0.0',
open: 'true',
openPage: '/dev.html'
}),
Expand Down
4 changes: 1 addition & 3 deletions src/wallets/Phantom.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/wallets/WindowEthereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { supported } from '../blockchains'
export default class WindowEthereum {

static info = {
name: 'Wallet (Ethereum)',
name: 'Ethereum Wallet',
logo: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlb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kJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDMiIHBvaW50cz0iMTI5LDIwNC43IDEyOC44LDIwNC45IDEyOC44LDIxNyAxMjksMjE3LjYgMTQ0LjgsMTk1LjQgCQkJIi8+CgkJCTxwb2x5Z29uIGNsYXNzPSJzdDIiIHBvaW50cz0iMTI5LDIxNy42IDEyOSwyMDQuNyAxMTMuMiwxOTUuNCAJCQkiLz4KCQkJPHBvbHlnb24gY2xhc3M9InN0NCIgcG9pbnRzPSIxMjksMjAxLjcgMTQ0LjgsMTkyLjQgMTI5LDE4NS4yIAkJCSIvPgoJCQk8cG9seWdvbiBjbGFzcz0ic3Q1IiBwb2ludHM9IjExMy4yLDE5Mi40IDEyOSwyMDEuNyAxMjksMTg1LjIgCQkJIi8+CgkJPC9nPgoJPC9nPgo8L2c+Cjwvc3ZnPgo=",
blockchains: supported.evm
}
Expand Down
12 changes: 9 additions & 3 deletions src/wallets/WindowSolana.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { supported } from '../blockchains'
export default class WindowSolana {

static info = {
name: 'Wallet (Solana)',
name: 'Solana Wallet',
logo: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NDYuNCAzNzYuOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgN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GU9InN0b3AtY29sb3I6IzAwRkZBMyIvPgoJPHN0b3AgIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6I0RDMUZGRiIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cGF0aCBzdHlsZT0iZmlsbDp1cmwoI1NWR0lEXzAwMDAwMDIyNTU3MTYwNTg5MTY1MTU3NTIwMDAwMDE1NDYyNjI0Mjk4Nzk4NTYzMjYxXyk7IiBkPSJNMTQ1LjYsMTg5LjFjLTAuMy0wLjMtMC43LTAuNS0xLjEtMC41CgloLTM4LjhjLTAuNywwLTEuMSwwLjktMC42LDEuNGw3LjcsNy43YzAuMywwLjMsMC43LDAuNSwxLjEsMC41aDM4LjhjMC43LDAsMS4xLTAuOSwwLjYtMS40TDE0NS42LDE4OS4xeiIvPgo8L3N2Zz4K',
blockchains: supported.solana
}

static isAvailable = async()=>{
return (
window?.solana &&
!(window.solana.isPhantom && Object.keys(window.solana).filter((key)=>key.match(/^is(?!Connected)/)).length == 1) &&
!(window.phantom && !window.glow && !window.solana.isGlow) &&
!window.coin98 &&
!window.solana.isGlow
)
Expand Down Expand Up @@ -105,5 +105,11 @@ export default class WindowSolana {
}
}

_sendTransaction(transaction) { return this.getProvider().signAndSendTransaction(transaction) }
_sendTransaction(transaction) {
return this.getProvider()
.signAndSendTransaction(
transaction,
{ skipPreflight: false } // requires default options to not raise error on phantom in app mobile (https://discord.com/channels/958228318132514876/974393659380334618/1089298098905423924)
)
}
}
2 changes: 1 addition & 1 deletion tests/units/wallets/WindowEthereum/main.evm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('window.ethereum wallet', () => {

it('should detect any generic wallet integration that integrates window.ethereum', () => {
mock(blockchain)
expect(wallet.name).toBe('Wallet (Ethereum)')
expect(wallet.name).toBe('Ethereum Wallet')
});

it('provides a connect function', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/units/wallets/WindowEthereum/main.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('window.ethereum wallet', () => {

it('should detect any generic wallet integration that integrates window.ethereum', () => {
mock(blockchain)
expect(wallet.name).toBe('Wallet (Ethereum)')
expect(wallet.name).toBe('Ethereum Wallet')
});

it('provides a connect function', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/units/wallets/WindowSolana/main.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('window.solana wallet', () => {

it('should detect any solana wallet integration that integrates window.solana', () => {
mock(blockchain)
expect(wallet.name).toBe('Wallet (Solana)')
expect(wallet.name).toBe('Solana Wallet')
});

it('provides a connect function', async () => {
Expand Down

0 comments on commit 745f5b5

Please sign in to comment.