-
Notifications
You must be signed in to change notification settings - Fork 395
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
BSC improvements #2729
Merged
+136
−23
Merged
BSC improvements #2729
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d4041a4
ENS Name Resolution for BSC
952991f
Add Coming Soon page for Gas Price Adjust
426bba0
Merge branch 'main' of github.com:tallycash/extension into bsc-improv…
010c8ba
Rename constant for MetaMask
b6392e4
Get the correct asset price point for the transaction
40e9dc5
Add bscscan.com to impersonate MetaMask list
9ea384e
Improve gas price preview for BSC
f75f7dc
Merge branch 'main' of github.com:tallycash/extension into bsc-improv…
28135b2
Rename baseFeePerGas to gasPrice for BSC
11bb5c3
Move the height calculation logic to a separate function in the trans…
1ccd57d
Fix NFTs configuration issue for BSC
9d7da41
Merge branch 'main' into bsc-improvements
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
ui/components/NetworkFees/NetworkSettingsSelectBNBChain.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useTranslation } from "react-i18next" | ||
import React, { ReactElement } from "react" | ||
|
||
export default function NetworkSettingsSelectBNBChain(): ReactElement { | ||
const { t } = useTranslation("translation", { | ||
keyPrefix: "networkFees.bsc", | ||
}) | ||
return ( | ||
<div className="content"> | ||
<span className="title">{t("title")}</span> | ||
<span className="description">{t("description")}</span> | ||
<style jsx> | ||
{` | ||
.content { | ||
color: var(--white); | ||
display: flex; | ||
flex-direction: column; | ||
gap: 24px; | ||
} | ||
.title { | ||
font-weight: 600; | ||
font-size: 18px; | ||
line-height: 24px; | ||
} | ||
.description { | ||
font-weight: 500; | ||
font-size: 16px; | ||
line-height: 24px; | ||
} | ||
`} | ||
</style> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,10 @@ import type { | |
EnrichedLegacyTransactionRequest, | ||
} from "@tallyho/tally-background/services/enrichment" | ||
import { useTranslation } from "react-i18next" | ||
import { EIP_1559_COMPLIANT_CHAIN_IDS } from "@tallyho/tally-background/constants" | ||
import { | ||
BINANCE_SMART_CHAIN, | ||
EIP_1559_COMPLIANT_CHAIN_IDS, | ||
} from "@tallyho/tally-background/constants" | ||
import { useBackgroundDispatch, useBackgroundSelector } from "../../hooks" | ||
import FeeSettingsButton from "../NetworkFees/FeeSettingsButton" | ||
import NetworkSettingsChooser from "../NetworkFees/NetworkSettingsChooser" | ||
|
@@ -86,18 +89,22 @@ export default function SignTransactionDetailPanel({ | |
setNetworkSettingsModalOpen(false) | ||
} | ||
|
||
const hight = `${ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we might benefit from pulling the logic in here into its own function |
||
transactionDetails.network.name === BINANCE_SMART_CHAIN.name | ||
? 150 | ||
: 3 * 56 + | ||
320 + | ||
(hasInsufficientFundsWarning ? 15 : 0) + | ||
(isEIP1559Compliant ? 0 : 40) | ||
}px` | ||
|
||
return ( | ||
<div className="detail_items_wrap standard_width_padded"> | ||
<SharedSlideUpMenu | ||
size="custom" | ||
isOpen={networkSettingsModalOpen} | ||
close={() => setNetworkSettingsModalOpen(false)} | ||
customSize={`${ | ||
3 * 56 + | ||
320 + | ||
(hasInsufficientFundsWarning ? 15 : 0) + | ||
(isEIP1559Compliant ? 0 : 40) | ||
}px`} | ||
customSize={hight} | ||
> | ||
<NetworkSettingsChooser | ||
estimatedFeesPerGas={estimatedFeesPerGas} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
lets call this parameter
gasPrice