File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
services/static-webserver/client/source/class/osparc/store Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -394,9 +394,15 @@ qx.Class.define("osparc.store.Store", {
394394 wallets . length
395395 ) {
396396 // If there is no default wallet set in preferences or the default wallet is not available anymore:
397- // select the personal wallet if it exists
398- // wallets = wallets.filter(wallet => wallet.getType() === "personal");
399- preferenceSettings . requestChangePreferredWalletId ( wallets [ 0 ] . getWalletId ( ) ) ;
397+ const myGroupId = osparc . auth . Data . getInstance ( ) . getGroupId ( ) ;
398+ const myWallet = wallets . filter ( wallet => wallet . getOwner ( ) === myGroupId ) ;
399+ if ( myWallet ) {
400+ // select the personal wallet if it exists
401+ preferenceSettings . requestChangePreferredWalletId ( myWallet . getWalletId ( ) ) ;
402+ } else {
403+ // otherwise select the first wallet available
404+ preferenceSettings . requestChangePreferredWalletId ( wallets [ 0 ] . getWalletId ( ) ) ;
405+ }
400406 } else if ( defaultWalletId ) {
401407 const walletFound = wallets . find ( wallet => wallet . getWalletId ( ) === defaultWalletId ) ;
402408 if ( walletFound ) {
You can’t perform that action at this time.
0 commit comments