Skip to content

Commit

Permalink
fix: In space settings, if the wallet application is not active for t…
Browse files Browse the repository at this point in the history
…he current space, the extension about wallet configuration is emty, but display a margin - EXO-69808 - Meeds-io/meeds#1710

Before this fix, even if a space have not wallet application, the wallet settings extension display a margin in space settings.
So, when there is another extension under this one, there is a double margin displayed

This commit add the function isEnabled one the walletSettings extension, and pass spaceApplications list to this function.
If the list contains the application SpaceWallet, then the extension is active, and displayed. If not, then the extension is not active, and not displayed, the unwanted margin is not displayed

Resolve Meeds-io/meeds#1710
  • Loading branch information
rdenarie committed Mar 6, 2024
1 parent c96e68a commit b8441c2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ if (extensionRegistry) {
id: 'wallet-space-settings',
vueComponent: Vue.options.components['wallet-settings'],
rank: 10,
isEnabled: (params) => {
return params.spaceApplications != null && params.spaceApplications.some( item => {
return item.id === 'SpaceWallet';
});
},
});
extensionRegistry.registerComponent('my-rewards-overview', 'my-rewards-item', {
id: 'wallet-rewards-overview',
Expand All @@ -121,4 +126,4 @@ if (extensionRegistry) {
vueComponent: Vue.options.components['wallet-user-balance'],
rank: 20,
});
}
}

0 comments on commit b8441c2

Please sign in to comment.