Skip to content

Commit

Permalink
Merge pull request #3287 from Emurgo/feat/YOEXT-793/make-delegation-b…
Browse files Browse the repository at this point in the history
…y-id-available-in-mainnet

[4.22.600] make delegation by id available in mainnet
  • Loading branch information
vsubhuman authored Sep 14, 2023
2 parents 250a6b1 + 991db5b commit fc73e13
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export default class TestnetWarningBanner extends Component<Props> {
<div className={styles.ergoWarning}>
<span key="0" className={styles.shelleyTestnetWarningIcon}><ShelleyTestnetWarningSvg /></span>
<div className={styles.text}>
NOTE: Due to the planned gradual termination of the Ergo wallets support in Yoroi extension,
NOTE: Due to the planned termination of the Ergo wallets support in Yoroi extension,
<br />
Starting with the next version any Ergo wallets in the list will be visible, but not operational!
Starting with the next version any Ergo wallets will be removed and no longer accessible!
<br />
Please make sure to migrate your Ergo funds and wallets to another application.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
display: flex;
justify-content: center;
align-items: center;
background: var(--yoroi-palette-background-banner-warning);
background: red;
.shelleyTestnetWarningIcon {
margin-right: 9px;
}
Expand Down
5 changes: 4 additions & 1 deletion packages/yoroi-extension/app/containers/wallet/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ class Wallet extends Component<AllProps> {
// ex: a cardano-only page for an Ergo wallet
// or no category is selected yet (wallet selected for the first time)
const visibilityContext = { selected: publicDeriver, walletHasAssets };
if (!activeCategory?.isVisible(visibilityContext)) {
if (
!activeCategory?.isVisible(visibilityContext)
&& activeCategory?.isHiddenButAllowed !== true
) {
const firstValidCategory = categories.find(c => c.isVisible(visibilityContext));
if (firstValidCategory == null) {
throw new Error(`Selected wallet has no valid category`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export type TopbarCategory = {|
selected: PublicDeriver<>,
walletHasAssets: boolean,
|}) => boolean | {| disabledReason: MessageDescriptor |},
isHiddenButAllowed?: boolean,
|};

export const allCategories: Array<TopbarCategory> = [];
Expand Down Expand Up @@ -142,6 +143,7 @@ export const CARDANO_DELEGATION: TopbarCategory = registerCategory({
|| networkId === networks.CardanoPreviewTestnet.NetworkId
);
},
isHiddenButAllowed: true,
});

/** Revamp Wallet categoriess */
Expand Down
2 changes: 1 addition & 1 deletion packages/yoroi-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/yoroi-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yoroi",
"version": "4.22.500",
"version": "4.22.600",
"description": "Cardano ADA wallet",
"scripts": {
"dev:build": "rimraf dev/ && babel-node scripts/build --type=debug",
Expand Down

0 comments on commit fc73e13

Please sign in to comment.