diff --git a/src/app/core/constants/token.constant.ts b/src/app/core/constants/token.constant.ts
index 4a5779554..57191b478 100644
--- a/src/app/core/constants/token.constant.ts
+++ b/src/app/core/constants/token.constant.ts
@@ -51,14 +51,30 @@ export enum ETokenNFTTypeBE {
export const TOKEN_EVM_BURNT = '0x0000000000000000000000000000000000000000';
export const SOCIAL_MEDIA = {
- github: {
- name: 'github',
- icon: 'assets/icons/icons-svg/basic/github.svg',
+ youtube: {
+ name: 'youtube',
+ icon: 'assets/icons/icons-svg/basic/youtube.svg',
},
twitter: {
name: 'twitter',
icon: 'assets/icons/icons-svg/basic/twitter.svg',
},
+ discord: {
+ name: 'discord',
+ icon: 'assets/icons/icons-svg/basic/discord.svg',
+ },
+ telegram: {
+ name: 'telegram',
+ icon: 'assets/icons/icons-svg/basic/telegram.svg',
+ },
+ linkedin: {
+ name: 'linkedin',
+ icon: 'assets/icons/icons-svg/basic/linkedIn.svg',
+ },
+ github: {
+ name: 'github',
+ icon: 'assets/icons/icons-svg/basic/github.svg',
+ },
facebook: {
name: 'facebook',
icon: 'assets/icons/icons-svg/basic/fb-circle.svg',
@@ -67,26 +83,10 @@ export const SOCIAL_MEDIA = {
name: 'medium',
icon: 'assets/icons/icons-svg/basic/medium.svg',
},
- telegram: {
- name: 'telegram',
- icon: 'assets/icons/icons-svg/basic/telegram.svg',
- },
- youtube: {
- name: 'youtube',
- icon: 'assets/icons/icons-svg/basic/youtube.svg',
- },
otherWebsite: {
name: 'otherWebsite',
icon: 'assets/icons/icons-svg/basic/global.svg',
},
- discord: {
- name: 'discord',
- icon: 'assets/icons/icons-svg/basic/discord.svg',
- },
- linkedin: {
- name: 'linkedin',
- icon: 'assets/icons/icons-svg/basic/linkedIn.svg',
- },
};
export const USDC_ADDRESS = '0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd';
diff --git a/src/app/core/data-services/api-cw20-token.service.ts b/src/app/core/data-services/api-cw20-token.service.ts
index 34c30f862..4a2f15a4e 100644
--- a/src/app/core/data-services/api-cw20-token.service.ts
+++ b/src/app/core/data-services/api-cw20-token.service.ts
@@ -217,12 +217,13 @@ export class ApiCw20TokenService {
parseNativeToken(account, coinsMarkets) {
const nativeId = this.env.coingecko.ids[0];
const coinMarket = coinsMarkets.find((coin) => coin.coinId === nativeId);
+
return {
name: this.env.chainName,
symbol: this.currencies.coinDenom,
decimals: this.currencies.coinDecimals,
denom: this.currencies.coinMinimalDenom,
- image: this.currencies.coinImageUrl,
+ image: this.currencies.coinImageUrl || coinMarket?.image,
contract_address: '-',
balance: account.data.total,
price: coinMarket?.currentPrice || 0,
diff --git a/src/app/core/pipes/custom-pipe.module.ts b/src/app/core/pipes/custom-pipe.module.ts
index 37e1b09ea..8e7c42f45 100644
--- a/src/app/core/pipes/custom-pipe.module.ts
+++ b/src/app/core/pipes/custom-pipe.module.ts
@@ -14,6 +14,7 @@ import { ObjectKeysPipe } from './object-keys.pipe';
import { CombineTxsMsgPipe, EllipsisPipe } from './string.pipe';
import { NameTagTooltipPipe } from './tooltip.pipe';
import { HighlightFunctionPipe } from './highlight-function.pipe';
+import { NewlinePipe } from './newline.pipe';
@NgModule({
imports: [CommonModule],
@@ -43,6 +44,7 @@ import { HighlightFunctionPipe } from './highlight-function.pipe';
CapacityPipe,
EvmAddressPipe,
HighlightFunctionPipe,
+ NewlinePipe
],
exports: [
JsonPipe,
@@ -70,6 +72,7 @@ import { HighlightFunctionPipe } from './highlight-function.pipe';
CapacityPipe,
EvmAddressPipe,
HighlightFunctionPipe,
+ NewlinePipe
],
providers: [],
})
diff --git a/src/app/core/pipes/newline.pipe.ts b/src/app/core/pipes/newline.pipe.ts
new file mode 100644
index 000000000..61052a3e0
--- /dev/null
+++ b/src/app/core/pipes/newline.pipe.ts
@@ -0,0 +1,14 @@
+import { Pipe, PipeTransform } from '@angular/core';
+import { DomSanitizer } from '@angular/platform-browser';
+
+@Pipe({ name: 'newline' })
+export class NewlinePipe implements PipeTransform {
+ constructor(private sanitizer: DomSanitizer) {}
+ transform(value: string) {
+ if (!value) return null;
+ let replacedValue = value;
+ replacedValue = replacedValue?.replace(/\n/gi, '
');
+ return this.sanitizer.bypassSecurityTrustHtml(replacedValue);
+ }
+}
+
diff --git a/src/app/core/services/token.service.ts b/src/app/core/services/token.service.ts
index 1f2f16b15..7c5d0548b 100644
--- a/src/app/core/services/token.service.ts
+++ b/src/app/core/services/token.service.ts
@@ -968,14 +968,17 @@ export class TokenService extends CommonService {
mappingSocialProfiles(socialProfiles: { [key: string]: string }) {
if (!socialProfiles) return [];
- return Object.keys(socialProfiles)
- ?.filter((key) => socialProfiles[key])
- ?.map((key) => {
- return {
+ const socialMapping = [];
+ Object.keys(SOCIAL_MEDIA).forEach((key) => {
+ if (socialProfiles[key]) {
+ const social = {
name: SOCIAL_MEDIA[key]?.name,
icon: SOCIAL_MEDIA[key]?.icon,
url: socialProfiles[key],
- };
- });
+ }
+ socialMapping.push(social);
+ }
+ })
+ return socialMapping;
}
}
diff --git a/src/app/pages/evm-token/evm-token-content/evm-token-content-tab/evm-token-info-tab/evm-token-info-tab.component.html b/src/app/pages/evm-token/evm-token-content/evm-token-content-tab/evm-token-info-tab/evm-token-info-tab.component.html
index 6c4707ec1..a74a7cce9 100644
--- a/src/app/pages/evm-token/evm-token-content/evm-token-content-tab/evm-token-info-tab/evm-token-info-tab.component.html
+++ b/src/app/pages/evm-token/evm-token-content/evm-token-content-tab/evm-token-info-tab/evm-token-info-tab.component.html
@@ -1,6 +1,4 @@