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

Upgrade wallet libs #588

Merged
merged 21 commits into from
Sep 29, 2023
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
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ jobs:
submodules: recursive
apbendi marked this conversation as resolved.
Show resolved Hide resolved

- uses: volta-cli/action@v4
with:
cache: false

- name: Install Foundry
uses: onbjerg/foundry-toolchain@v1
with:
version: nightly

- run: yarn install --network-concurrency 1
- run: yarn list
- run: yarn install --frozen-lockfile --verbose --network-concurrency 1

- run: yarn build
tests:
Expand Down
10 changes: 5 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"@umbracash/umbra-js": "^0.1.0",
"@uniswap/token-lists": "^1.0.0-beta.19",
"@unstoppabledomains/resolution": "8.5.0",
"@web3-onboard/coinbase": "^2.2.0",
"@web3-onboard/core": "^2.11.1",
"@web3-onboard/injected-wallets": "^2.4.0",
"@web3-onboard/ledger": "^2.3.2",
"@web3-onboard/coinbase": "^2.2.5",
"@web3-onboard/core": "^2.21.0",
"@web3-onboard/injected-wallets": "^2.10.4",
"@web3-onboard/ledger": "^2.5.2",
"@web3-onboard/trezor": "^2.3.2",
"@web3-onboard/walletconnect": "^2.4.1",
"@web3-onboard/walletconnect": "2.4.1",
"bnc-notify": "^1.5.1",
"core-js": "^3.6.5",
"ethers": "5.7.2",
Expand Down
72 changes: 72 additions & 0 deletions frontend/public/icons/favicon-128x128.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions frontend/src/store/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ const walletConnect = walletConnectModule({
version: 2,
});
const coinbaseWalletSdk = coinbaseWalletModule();
const ledger = ledgerModule();
const ledger = ledgerModule({
projectId: process.env.WALLET_CONNECT_PROJECT_ID || '',
walletConnectVersion: 2,
});
const trezor = trezorModule({ email: '[email protected]', appUrl: 'https://app.umbra.cash/' });

/**
Expand Down Expand Up @@ -119,8 +122,8 @@ export default function useWalletStore() {
},
appMetadata: {
name: 'Umbra',
icon: '/icons/favicon-128x128.png',
logo: '/icons/favicon-128x128.png',
icon: '/icons/favicon-128x128.svg',
logo: '/icons/favicon-128x128.svg',
description: 'Send stealth payments.',
explore: 'https://app.umbra.cash/faq',
},
Expand All @@ -132,9 +135,6 @@ export default function useWalletStore() {
window.location.reload();
});
wallet.provider.on('chainChanged', () => {
if (wallet.label === 'WalletConnect' && !lastWallet.value) {
setLastWallet('WalletConnect');
}
mds1 marked this conversation as resolved.
Show resolved Hide resolved
window.location.reload();
});
});
Expand Down Expand Up @@ -216,7 +216,7 @@ export default function useWalletStore() {
let connectedWallet;
if (lastWallet.value) {
[connectedWallet] = await onboard.value.connectWallet({
autoSelect: { label: lastWallet.value, disableModals: true },
autoSelect: lastWallet?.value,
});
} else {
[connectedWallet] = await onboard.value.connectWallet();
Expand Down
3 changes: 2 additions & 1 deletion umbra-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"mocha": "^8.3.2",
"nyc": "^15.1.0",
"ts-node": "^9.0.0",
"typedoc": "^0.20.35"
"typedoc": "^0.20.35",
"typescript": "^4.0.3"
},
"keywords": [
"ethereum",
Expand Down
17 changes: 16 additions & 1 deletion umbra-js/test/cns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@ import * as utils from '../src/utils/utils';
import { StaticJsonRpcProvider } from '../src/ethers';

// const ethersProvider = ethers.provider;
const resolution = new Resolution();
const resolution = new Resolution({
sourceConfig: {
uns: {
locations: {
Layer1: {
url: `https://mainnet.infura.io/v3/${String(process.env.INFURA_ID)}`,
network: 'mainnet',
},
Layer2: {
url: `https://polygon-mainnet.infura.io/v3/${String(process.env.INFURA_ID)}`,
network: 'polygon-mainnet',
},
},
},
},
});

// Truth parameters to test against
const name = 'blockdudes.nft';
Expand Down
3 changes: 2 additions & 1 deletion umbra-js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"baseUrl": "./",
"paths": {
"@sinonjs/fake-timers": ["../node_modules/@types/sinonjs__fake-timers"]
}
},
"typeRoots": ["./node_modules/@types"]
apbendi marked this conversation as resolved.
Show resolved Hide resolved
},
"include": ["./src/**/*", "./src/**/*.json", "./types/**/*"]
}
Loading
Loading