Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions data-service/classes/DataManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ export class DataManager {
[WavesApp.defaultAssets.DASH]: true,
[WavesApp.defaultAssets.XMR]: true,
[WavesApp.defaultAssets.VST]: true,
[WavesApp.defaultAssets.ERGO]: true,
};

const gatewaysSoon = (window as any).angular
.element(document.body).injector().get('configService').get('GATEWAYS_SOON') || [];

const descriptionHash = {
WAVES: { en: 'Waves is a blockchain ecosystem that offers comprehensive and effective blockchain-based tools for businesses, individuals and developers. Waves Platform offers unprecedented throughput and flexibility. Features include the LPoS consensus algorithm, Waves-NG protocol and advanced smart contract functionality.' }
};
Expand All @@ -97,10 +101,19 @@ export class DataManager {
description: descriptionHash[id]
};

const gatewaySoonAsset = {
...gatewayAsset,
status: 4
};

if (id === 'WAVES') {
return { status: STATUS_LIST.VERIFIED, description: descriptionHash.WAVES } as any;
}

if (gatewaysSoon.indexOf(id) > -1) {
return gatewaySoonAsset;
}

if (gateways[id]) {
return gatewayAsset;
}
Expand Down
5 changes: 4 additions & 1 deletion mocks/waves-client-config/master/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,8 @@
]
}
},
"SERVICE_TEMPORARILY_UNAVAILABLE": false
"SERVICE_TEMPORARILY_UNAVAILABLE": false,
"GATEWAYS_SOON": [
"5dJj4Hn9t2Ve3tRpNGirUHy4yBK6qdJRAJYV21yPPuGz"
]
}
5 changes: 4 additions & 1 deletion mocks/waves-client-config/master/testnet.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@
]
}
},
"SERVICE_TEMPORARILY_UNAVAILABLE": false
"SERVICE_TEMPORARILY_UNAVAILABLE": false,
"GATEWAYS_SOON": [
"GVWSgVsmEx4KTAZPm31JZDmdehxFTFZBuy7V8gzb8JxE"
]
}
13 changes: 13 additions & 0 deletions src/img/assets/ergo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@
DASH: config.network.assets.DASH,
TRY: config.network.assets.TRY,
XMR: config.network.assets.XMR,
VST: config.network.assets.VST
VST: config.network.assets.VST,
ERGO: config.network.assets.ERGO
},
tradingPairs: config.tradingPairs,
ALWAYS_PINNED_ASSETS: ['WAVES'],
Expand Down
3 changes: 2 additions & 1 deletion src/modules/app/services/DefaultSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
WavesApp.defaultAssets.TRY,
WavesApp.defaultAssets.DASH,
WavesApp.defaultAssets.XMR,
WavesApp.defaultAssets.VST
WavesApp.defaultAssets.VST,
WavesApp.defaultAssets.ERGO
],
wallet: {
activeState: 'assets',
Expand Down
2 changes: 2 additions & 0 deletions src/modules/ui/directives/assetStatus/AssetStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@
isGateway,
isTokenomica,
isSuspicious,
isGatewaySoon,
hasLabel
} = utils.getDataFromOracles(this.assetId);
this.isGateway = isGateway;
this.isTokenomica = isGateway ? false : isTokenomica;
this.isVerified = isTokenomica ? false : isVerified;
this.isSuspicious = isVerified ? false : isSuspicious;
this.isGatewaySoon = isGateway ? false : isGatewaySoon;
this.hasLabel = hasLabel;

// TODO: delete after contest
Expand Down
4 changes: 4 additions & 0 deletions src/modules/ui/directives/assetStatus/asset-status.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
class="status-label-min warning"
w-i18n-ns="app.utils"
w-i18n="modal.assetInfo.contest"></span>
<span ng-if="$ctrl.isGatewaySoon"
class="status-label-min active"
w-i18n-ns="app.utils"
w-i18n="modal.assetInfo.gatewaySoon"></span>
7 changes: 6 additions & 1 deletion src/modules/utils/services/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
[WavesApp.defaultAssets.TRY]: '/img/assets/try.svg',
[WavesApp.defaultAssets.XMR]: '/img/assets/xmr.svg',
[WavesApp.defaultAssets.VST]: '/img/assets/vostok.svg',
[WavesApp.defaultAssets.ERGO]: '/img/assets/ergo.svg',
[WavesApp.otherAssetsWithIcons.EFYT]: '/img/assets/efyt.svg',
[WavesApp.otherAssetsWithIcons.WNET]: '/img/assets/wnet.svg'
});
Expand Down Expand Up @@ -1161,7 +1162,10 @@
path(['provider'], dataOracle) !== 'Tokenomica';

const isSuspicious = user.scam[assetId];
const hasLabel = isVerified || isGateway || isSuspicious || isTokenomica;

const isGatewaySoon = path(['status'], dataOracle) === 4;

const hasLabel = isVerified || isGateway || isSuspicious || isTokenomica || isGatewaySoon;

const ticker = path(['ticker'], dataOracle);
const link = path(['link'], dataOracle);
Expand All @@ -1175,6 +1179,7 @@
isGateway,
isTokenomica,
isSuspicious,
isGatewaySoon,
hasLabel,
ticker,
link,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
const firstAssetChar = this.balance.asset.name.slice(0, 1);
const canPayFee = list.find(item => item.asset.id === this.balance.asset.id) && !this._isWaves;
const { isVerified, isGateway,
isTokenomica, logo } = utils.getDataFromOracles(this.balance.asset.id);
isTokenomica, logo, isGatewaySoon } = utils.getDataFromOracles(this.balance.asset.id);

this.isVerifiedOrGateway = isVerified || isGateway;

Expand All @@ -200,6 +200,7 @@
isVerified: isVerified,
isGateway: isGateway,
isTokenomica: isTokenomica,
isGatewaySoon: isGatewaySoon,
assetIconPath: logo ||
this.utils.getAssetLogo(this.balance.asset.id) ||
CONTEST_ASSET_ID_MAP[this.balance.asset.id],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
{{#if isTokenomica}}
<span class="status-label-min active" w-i18n-literal="tokenomica"></span>
{{/if}}
{{#if isGatewaySoon}}
<span class="status-label-min active" w-i18n-literal="gateway soon"></span>
{{/if}}
<span class="status-label-min inactive {{SELECTORS.SUSPICIOUS_LABEL}}" w-i18n-literal="suspicious"></span>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions ts-scripts/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@
"EFYT": "FvKx3cerSVYGfXKFvUgp7koNuTAcLs8DmtmwRrFVCqJv",
"WNET": "3P8gkhcLhFQvBkDzMnWeqqwvq3qxkpTNQPs4LUQ95tKD",
"XMR": "8oPbSCKFHkXBy1hCGSg9pJkSARE7zhTQTLpc8KZwdtr7",
"VST": "63QkN8KKRMVBpkCM7azV6HiPacJ3T7EP6vmFUNVRsvAX"
"VST": "63QkN8KKRMVBpkCM7azV6HiPacJ3T7EP6vmFUNVRsvAX",
"ERGO": "GVWSgVsmEx4KTAZPm31JZDmdehxFTFZBuy7V8gzb8JxE"
}
},
"mainnet": {
Expand Down Expand Up @@ -297,7 +298,8 @@
"EFYT": "725Yv9oceWsB4GsYwyy4A52kEwyVrL5avubkeChSnL46",
"WNET": "AxAmJaro7BJ4KasYiZhw7HkjwgYtt2nekPuF2CN9LMym",
"XMR": "5WvPKSJXzVE2orvbkJ8wsQmmQKqTv9sGBPksV4adViw3",
"VST": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8"
"VST": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8",
"ERGO": "5dJj4Hn9t2Ve3tRpNGirUHy4yBK6qdJRAJYV21yPPuGz"
}
}
}
Expand Down