-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
chore: adds Solana support for the account overview #28411
Open
zone-live
wants to merge
28
commits into
develop
Choose a base branch
from
SOL-2-view-solana-account-overview
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+436
−198
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
73c498f
chore: adds SOL support
zone-live dd6fcbf
chore: prettier run
zone-live 8a51986
chore: clean up
zone-live a56008b
chore: adds comment and btc check for now
zone-live f503046
chore: updates packages version to support Solana
zone-live 3684963
Merge branch 'develop' into SOL-2-view-solana-account-overview
zone-live 3cbd887
Update LavaMoat policies
metamaskbot 6248ba5
chore: update enum value
zone-live 97c7198
chore: undo
zone-live b0dd1c6
chore: improvements
zone-live e40f75c
chore: prettier
zone-live 1a81480
chore: undo change
zone-live d7da72a
chore: test update for balancesController
zone-live 7743068
chore: prettier
zone-live 7daa2ac
chore: import order, lint
zone-live e6e8485
chore: test update
zone-live 9142284
chore: test update
zone-live 9d4e4f2
Merge branch 'develop' into SOL-2-view-solana-account-overview
zone-live 3a16d1c
chore: updates the metamask/assets-controllers package
zone-live 22d1eba
Update LavaMoat policies
metamaskbot 1cf494e
Merge branch 'develop' into SOL-2-view-solana-account-overview
zone-live 6c8e19e
chore: re-apply the patch for assets-controllers
zone-live 9babd20
Update LavaMoat policies
metamaskbot cc81cda
chore: update e2e snapshots data
zone-live 4fedc02
Merge branch 'SOL-2-view-solana-account-overview' of github.com:MetaM…
zone-live 9f1189b
chore: update e2e
zone-live ce125fa
chore: comment flaky endpoint
zone-live 547c71d
Merge branch 'develop' into SOL-2-view-solana-account-overview
zone-live 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { default as EthOverview } from './eth-overview'; | ||
export { default as BtcOverview } from './btc-overview'; | ||
export { default as NonEvmOverview } from './non-evm-overview'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { useSelector } from 'react-redux'; | ||
import { | ||
getMultichainProviderConfig, | ||
getMultichainSelectedAccountCachedBalance, | ||
} from '../../../selectors/multichain'; | ||
import { CoinOverview } from './coin-overview'; | ||
|
||
type SolOverviewProps = { | ||
className?: string; | ||
}; | ||
|
||
const SolOverview = ({ className }: SolOverviewProps) => { | ||
const { chainId } = useSelector(getMultichainProviderConfig); | ||
const balance = useSelector(getMultichainSelectedAccountCachedBalance); | ||
|
||
return ( | ||
<CoinOverview | ||
balance={balance} | ||
balanceIsCached={false} | ||
className={className} | ||
chainId={chainId} | ||
isSigningEnabled={true} | ||
isSwapsChain={false} | ||
isBridgeChain={false} | ||
isBuyableChain={false} | ||
/> | ||
); | ||
}; | ||
|
||
export default SolOverview; |
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
12 changes: 0 additions & 12 deletions
12
ui/components/multichain/account-overview/account-overview-btc.stories.tsx
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
ui/components/multichain/account-overview/account-overview-non-evm.stories.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,19 @@ | ||
import React from 'react'; | ||
import { AccountOverviewNonEvm } from './account-overview-non-evm'; | ||
import { AccountOverviewCommonProps } from './common'; | ||
import { BtcAccountType, SolAccountType } from '@metamask/keyring-api'; | ||
|
||
export default { | ||
title: 'Components/Multichain/AccountOverviewNonEvm', | ||
component: AccountOverviewNonEvm, | ||
args: { | ||
accountType: BtcAccountType.P2wpkh, | ||
}, | ||
}; | ||
|
||
export const DefaultStory = ( | ||
args: JSX.IntrinsicAttributes & | ||
AccountOverviewCommonProps & { | ||
accountType: BtcAccountType.P2wpkh | SolAccountType.DataAccount; | ||
}, | ||
) => <AccountOverviewNonEvm {...args} />; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
This method, updateBalance, will be updated once we have the network picker. The scope will adapt based on the network selected.