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

[DO NOT MERGE] ERC20PM Preview #2761

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion apps/laboratory/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const cspHeader = `
connect-src 'self' https://react-wallet.walletconnect.com https://rpc.walletconnect.com https://rpc.walletconnect.org https://relay.walletconnect.com https://relay.walletconnect.org wss://relay.walletconnect.com wss://relay.walletconnect.org https://pulse.walletconnect.com https://pulse.walletconnect.org https://api.web3modal.com https://api.web3modal.org wss://www.walletlink.org https://o1095249.ingest.sentry.io https://quote-api.jup.ag;
frame-src 'self' https://verify.walletconnect.com https://verify.walletconnect.org https://secure.walletconnect.com https://secure.walletconnect.org ${
process.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL || ''
} https://widget.solflare.com/;
} https://widget.solflare.com/ https://secure-appkit-git-feat-erc20-approval-for-sponsor-reown-com.vercel.app;
object-src 'none';
base-uri 'self';
form-action 'self';
Expand Down
10 changes: 6 additions & 4 deletions packages/core/src/controllers/SwapController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,10 +813,12 @@
sourceTokenAddress,
state.myTokensWithBalance
)
const insufficientNetworkTokenForGas = SwapCalculationUtil.isInsufficientNetworkTokenForGas(
state.networkBalanceInUSD,
state.gasPriceInUSD
)
const insufficientNetworkTokenForGas = false

// SwapCalculationUtil.isInsufficientNetworkTokenForGas(

Check failure on line 818 in packages/core/src/controllers/SwapController.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Expected a block comment instead of consecutive line comments
// state.networkBalanceInUSD,

Check failure on line 819 in packages/core/src/controllers/SwapController.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Comments should not begin with a lowercase character
// state.gasPriceInUSD

Check failure on line 820 in packages/core/src/controllers/SwapController.ts

View workflow job for this annotation

GitHub Actions / code_style (lint)

Comments should not begin with a lowercase character
// )

return insufficientNetworkTokenForGas || isInsufficientSourceTokenForSwap
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class W3mWalletSendView extends LitElement {
private async fetchNetworkPrice() {
await SwapController.getNetworkTokenPrice()
const gas = await SwapController.getInitialGasPrice()
console.log('> Wallet send view gas:', gas)
if (gas?.gasPrice && gas?.gasPriceInUSD) {
SendController.setGasPrice(gas.gasPrice)
SendController.setGasPriceInUsd(gas.gasPriceInUSD)
Expand Down
Loading
Loading