-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat(wallets): trezor wallet support #3020
Conversation
… feat/trezor-wallet-support
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
margin: 10px 0; | ||
` | ||
|
||
// TODO: add styles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
craco.config.js
Outdated
@@ -92,6 +92,7 @@ module.exports = { | |||
http: require.resolve('stream-http'), | |||
https: require.resolve('https-browserify'), | |||
crypto: require.resolve('crypto-browserify'), | |||
zlib: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trezor/connect-plugin-ethereum
requires @metamask/eth-sig-util
that requires zlib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding @metamask/eth-sig-util
Does it need to be explicitly installed? Isn't it enough to have it installed by the @trezor
package?
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
|
||
const handleApprove = useCallback(async () => { | ||
if (shouldZeroApprove) { | ||
await zeroApprove() | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we didn't display errors from token approving
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
I have a few comments.
Keep in mind I couldn't test it as I don't have a Trezor setup.
craco.config.js
Outdated
@@ -92,6 +92,7 @@ module.exports = { | |||
http: require.resolve('stream-http'), | |||
https: require.resolve('https-browserify'), | |||
crypto: require.resolve('crypto-browserify'), | |||
zlib: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding @metamask/eth-sig-util
Does it need to be explicitly installed? Isn't it enough to have it installed by the @trezor
package?
src/modules/wallet/web3-react/connectors/TrezorConnector/index.ts
Outdated
Show resolved
Hide resolved
src/modules/wallet/web3-react/connectors/TrezorConnector/sendTransactionHandler.ts
Outdated
Show resolved
Hide resolved
src/modules/wallet/web3-react/connectors/TrezorConnector/sendTransactionHandler.ts
Outdated
Show resolved
Hide resolved
Hey @shoom3301 , works great!
AR: the TX will fail. User needs to refresh a page in order to proceed ER: disconnect a user when press son Cancel? The app appears to be disconnected when I refresh the page. Anyways, this issue can be fixed in another PR. I opened #3044 issue for this. |
memo[address] = CurrencyAmount.fromRawAmount(nativeOnChain(chainId), JSBI.BigInt(value.toString())) | ||
memo[lowerCaseAddress ? address.toLowerCase() : address] = CurrencyAmount.fromRawAmount( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make all addresses lowercase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about other cases, don't want to break smth
… feat/trezor-wallet-support
Summary
Done:
Nuances:
gasPrice
for Goerli in CowSwap. I've temporary hardcoded 40 GWEI