Skip to content

Commit 8497ad1

Browse files
committed
show warning message
1 parent 1a5c20b commit 8497ad1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

services/static-webserver/client/source/class/osparc/desktop/MainPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ qx.Class.define("osparc.desktop.MainPage", {
6868
const preloadPromises = [];
6969
const walletsEnabled = osparc.desktop.credits.Utils.areWalletsEnabled();
7070
if (walletsEnabled) {
71-
preloadPromises.push(store.reloadCreditPrice());
72-
preloadPromises.push(store.reloadWallets());
71+
preloadPromises.push(store.fetchCreditPrice());
72+
preloadPromises.push(store.fetchWallets());
7373
}
7474
preloadPromises.push(store.getAllClassifiers(true));
7575
preloadPromises.push(osparc.store.Tags.getInstance().fetchTags());

services/static-webserver/client/source/class/osparc/store/Store.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ qx.Class.define("osparc.store.Store", {
436436
return null;
437437
},
438438

439-
reloadCreditPrice: function() {
439+
fetchCreditPrice: function() {
440440
const store = osparc.store.Store.getInstance();
441441
store.setCreditPrice(null);
442442

@@ -489,15 +489,22 @@ qx.Class.define("osparc.store.Store", {
489489
return 0;
490490
},
491491

492-
reloadWallets: function() {
492+
fetchWallets: function() {
493493
return new Promise((resolve, reject) => {
494494
osparc.data.Resources.fetch("wallets", "get")
495495
.then(walletsData => {
496+
let personalWalletFound = false;
496497
const wallets = [];
498+
const myGroupId = osparc.auth.Data.getInstance().getGroupId();
497499
walletsData.forEach(walletReducedData => {
500+
personalWalletFound = personalWalletFound || myGroupId === walletReducedData["owner"];
498501
const wallet = new osparc.data.model.Wallet(walletReducedData);
499502
wallets.push(wallet);
500503
});
504+
if (!personalWalletFound) {
505+
const msg = this.tr("No personal wallet found, some functionalities might not work properly. Please contact support.");
506+
osparc.FlashMessenger.logAs(msg, "WARNING");
507+
}
501508
this.setWallets(wallets);
502509

503510
// 1) fetch the access rights

0 commit comments

Comments
 (0)