diff --git a/data-service/classes/DataManager.ts b/data-service/classes/DataManager.ts index 257973389e..2cd8a00938 100644 --- a/data-service/classes/DataManager.ts +++ b/data-service/classes/DataManager.ts @@ -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.' } }; @@ -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; } diff --git a/mocks/waves-client-config/master/config.json b/mocks/waves-client-config/master/config.json index 315ac896e2..a5cdf8a89b 100644 --- a/mocks/waves-client-config/master/config.json +++ b/mocks/waves-client-config/master/config.json @@ -73,5 +73,8 @@ ] } }, - "SERVICE_TEMPORARILY_UNAVAILABLE": false + "SERVICE_TEMPORARILY_UNAVAILABLE": false, + "GATEWAYS_SOON": [ + "5dJj4Hn9t2Ve3tRpNGirUHy4yBK6qdJRAJYV21yPPuGz" + ] } diff --git a/mocks/waves-client-config/master/testnet.config.json b/mocks/waves-client-config/master/testnet.config.json index 105975942c..4f31c50ca2 100644 --- a/mocks/waves-client-config/master/testnet.config.json +++ b/mocks/waves-client-config/master/testnet.config.json @@ -51,5 +51,8 @@ ] } }, - "SERVICE_TEMPORARILY_UNAVAILABLE": false + "SERVICE_TEMPORARILY_UNAVAILABLE": false, + "GATEWAYS_SOON": [ + "GVWSgVsmEx4KTAZPm31JZDmdehxFTFZBuy7V8gzb8JxE" + ] } diff --git a/src/img/assets/ergo.svg b/src/img/assets/ergo.svg new file mode 100644 index 0000000000..010b09446c --- /dev/null +++ b/src/img/assets/ergo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/index.hbs b/src/index.hbs index 640028057b..b5f986a2ad 100644 --- a/src/index.hbs +++ b/src/index.hbs @@ -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'], diff --git a/src/modules/app/services/DefaultSettings.js b/src/modules/app/services/DefaultSettings.js index f5f7a18fca..91b7efd308 100644 --- a/src/modules/app/services/DefaultSettings.js +++ b/src/modules/app/services/DefaultSettings.js @@ -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', diff --git a/src/modules/ui/directives/assetStatus/AssetStatus.js b/src/modules/ui/directives/assetStatus/AssetStatus.js index ef398bc28b..7bac0e59a1 100644 --- a/src/modules/ui/directives/assetStatus/AssetStatus.js +++ b/src/modules/ui/directives/assetStatus/AssetStatus.js @@ -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 diff --git a/src/modules/ui/directives/assetStatus/asset-status.html b/src/modules/ui/directives/assetStatus/asset-status.html index 23f92de8b5..e73c734f29 100644 --- a/src/modules/ui/directives/assetStatus/asset-status.html +++ b/src/modules/ui/directives/assetStatus/asset-status.html @@ -19,3 +19,7 @@ class="status-label-min warning" w-i18n-ns="app.utils" w-i18n="modal.assetInfo.contest"> + diff --git a/src/modules/utils/services/utils.js b/src/modules/utils/services/utils.js index c0a3a2a326..e8f67a316d 100644 --- a/src/modules/utils/services/utils.js +++ b/src/modules/utils/services/utils.js @@ -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' }); @@ -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); @@ -1175,6 +1179,7 @@ isGateway, isTokenomica, isSuspicious, + isGatewaySoon, hasLabel, ticker, link, diff --git a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js index 7155d71435..3ac0ecc3c0 100644 --- a/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js +++ b/src/modules/wallet/modules/portfolio/directives/portfolioRow/PortfolioRow.js @@ -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; @@ -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], diff --git a/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs b/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs index d196585b47..99cf40ac33 100644 --- a/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs +++ b/src/modules/wallet/modules/portfolio/directives/portfolioRow/row.hbs @@ -22,6 +22,9 @@ {{#if isTokenomica}} {{/if}} + {{#if isGatewaySoon}} + + {{/if}} diff --git a/ts-scripts/meta.json b/ts-scripts/meta.json index 9e598cb0b4..885650b554 100644 --- a/ts-scripts/meta.json +++ b/ts-scripts/meta.json @@ -250,7 +250,8 @@ "EFYT": "FvKx3cerSVYGfXKFvUgp7koNuTAcLs8DmtmwRrFVCqJv", "WNET": "3P8gkhcLhFQvBkDzMnWeqqwvq3qxkpTNQPs4LUQ95tKD", "XMR": "8oPbSCKFHkXBy1hCGSg9pJkSARE7zhTQTLpc8KZwdtr7", - "VST": "63QkN8KKRMVBpkCM7azV6HiPacJ3T7EP6vmFUNVRsvAX" + "VST": "63QkN8KKRMVBpkCM7azV6HiPacJ3T7EP6vmFUNVRsvAX", + "ERGO": "GVWSgVsmEx4KTAZPm31JZDmdehxFTFZBuy7V8gzb8JxE" } }, "mainnet": { @@ -297,7 +298,8 @@ "EFYT": "725Yv9oceWsB4GsYwyy4A52kEwyVrL5avubkeChSnL46", "WNET": "AxAmJaro7BJ4KasYiZhw7HkjwgYtt2nekPuF2CN9LMym", "XMR": "5WvPKSJXzVE2orvbkJ8wsQmmQKqTv9sGBPksV4adViw3", - "VST": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8" + "VST": "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8", + "ERGO": "5dJj4Hn9t2Ve3tRpNGirUHy4yBK6qdJRAJYV21yPPuGz" } } }