diff --git a/package.json b/package.json
index e90ce964e..f144af159 100644
--- a/package.json
+++ b/package.json
@@ -85,6 +85,5 @@
"last 2 versions",
"not dead",
"not ie 11"
- ],
- "packageManager": "yarn@4.0.1"
+ ]
}
diff --git a/src/components/AccountDetailsPanel.vue b/src/components/AccountDetailsPanel.vue
index b52d87237..3e0e90e58 100644
--- a/src/components/AccountDetailsPanel.vue
+++ b/src/components/AccountDetailsPanel.vue
@@ -10,11 +10,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
align-items: center;
}
- &__copy-chip {
- display: none;
-
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__copy-chip-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
-
&__not-existent {
margin: 0 0 var(--space-3) 0;
}
diff --git a/src/components/KeyblockDetailsPanel.vue b/src/components/KeyblockDetailsPanel.vue
index cf40624ea..29fa374e9 100644
--- a/src/components/KeyblockDetailsPanel.vue
+++ b/src/components/KeyblockDetailsPanel.vue
@@ -7,11 +7,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
-
+
{{ keyblockDetails.miner }}
-
+
{{ formatEllipseHash(keyblockDetails.miner) }}
|
@@ -83,10 +83,10 @@
-
+
{{ keyblockDetails.beneficiary }}
-
+
{{ formatEllipseHash(keyblockDetails.beneficiary) }}
@@ -229,21 +229,6 @@ const isNextKeyblockMined = computed(() =>
}
}
- &__chip,
- &__hash {
- display: none;
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__chip-ellipse,
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
-
&__not-existent {
margin: var(--space-3) 0;
}
diff --git a/src/components/MicroblockDetailsPanel.vue b/src/components/MicroblockDetailsPanel.vue
index 3b1551330..ef162cf1b 100644
--- a/src/components/MicroblockDetailsPanel.vue
+++ b/src/components/MicroblockDetailsPanel.vue
@@ -6,11 +6,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
@@ -23,10 +23,10 @@
-
+
{{ microblockDetails.prevKeyHash }}
-
+
{{ formatEllipseHash(microblockDetails.prevKeyHash) }}
@@ -153,20 +153,5 @@ const microblockMiddlewareUrl = computed(() =>
margin-right: var(--space-3);
}
}
-
- &__chip,
- &__hash {
- display: none;
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__chip-ellipse,
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
}
diff --git a/src/components/NftsDetailsPanel.vue b/src/components/NftsDetailsPanel.vue
index d8d6716db..1b1029f08 100644
--- a/src/components/NftsDetailsPanel.vue
+++ b/src/components/NftsDetailsPanel.vue
@@ -6,11 +6,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
@@ -145,20 +145,5 @@ defineProps({
gap: var(--space-1);
justify-content: flex-end;
}
-
- &__chip,
- &__hash {
- display: none;
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__chip-ellipse,
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
}
diff --git a/src/components/OracleDetailsPanel.vue b/src/components/OracleDetailsPanel.vue
index b73a307f7..12183b453 100644
--- a/src/components/OracleDetailsPanel.vue
+++ b/src/components/OracleDetailsPanel.vue
@@ -6,11 +6,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
@@ -133,10 +133,10 @@
-
+
{{ oracleDetails.operator }}
-
+
{{ formatEllipseHash(oracleDetails.operator) }}
@@ -225,20 +225,5 @@ const oracleMiddlewareUrl = computed(() =>
margin-right: var(--space-3);
}
}
-
- &__chip,
- &__hash {
- display: none;
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__chip-ellipse,
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
}
diff --git a/src/components/StateChannelDetailsPanel.vue b/src/components/StateChannelDetailsPanel.vue
index eaa97d5a3..4e2db552c 100644
--- a/src/components/StateChannelDetailsPanel.vue
+++ b/src/components/StateChannelDetailsPanel.vue
@@ -6,11 +6,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
@@ -37,10 +37,10 @@
-
+
{{ stateChannelDetails.createTransactionHash }}
-
+
{{ formatEllipseHash(stateChannelDetails.createTransactionHash) }}
@@ -66,10 +66,10 @@
|
-
+
{{ stateChannelDetails.initiator }}
-
+
{{ formatEllipseHash(stateChannelDetails.initiator) }}
@@ -84,10 +84,10 @@
|
-
+
{{ stateChannelDetails.responder }}
-
+
{{ formatEllipseHash(stateChannelDetails.responder) }}
@@ -222,20 +222,5 @@ const stateChannelMiddlewareUrl = `${MIDDLEWARE_URL}/v2/channels/${props.stateCh
display: inline-flex;
align-items: center;
}
-
- &__chip,
- &__hash {
- display: none;
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__chip-ellipse,
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
}
diff --git a/src/components/TransactionGeneralPanel.vue b/src/components/TransactionGeneralPanel.vue
index b224b1875..ced50c856 100644
--- a/src/components/TransactionGeneralPanel.vue
+++ b/src/components/TransactionGeneralPanel.vue
@@ -6,11 +6,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
@@ -77,12 +77,12 @@
+ class="u-hidden-mobile">
{{ transactionDetails.blockHash }}
+ class="u-hidden-desktop">
{{ formatEllipseHash(transactionDetails.blockHash) }}
|
@@ -219,18 +219,5 @@ const transactionMiddlewareUrl = computed(() => {
margin-right: var(--space-3);
}
}
-
- &__hash {
- display: none;
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
}
diff --git a/src/components/TransactionTypePanel.vue b/src/components/TransactionTypePanel.vue
index 8166d7c2a..5332a19e2 100644
--- a/src/components/TransactionTypePanel.vue
+++ b/src/components/TransactionTypePanel.vue
@@ -14,11 +14,11 @@
+ class="u-hidden-mobile"/>
+ class="u-hidden-desktop"/>
{{ transactionData.tx.tx.type }}
@@ -102,20 +102,6 @@ watch(props.transactionData, () => {
}
}
- &__copy-chip {
- display: none;
-
- @media (--desktop) {
- display: inline-flex;
- }
- }
-
- &__copy-chip-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
-
&__payer {
word-wrap: anywhere;
max-width: 100%;
diff --git a/src/components/TransactionTypeTableSpendTx.vue b/src/components/TransactionTypeTableSpendTx.vue
index 2607e82e3..a0f55988d 100644
--- a/src/components/TransactionTypeTableSpendTx.vue
+++ b/src/components/TransactionTypeTableSpendTx.vue
@@ -10,10 +10,10 @@
-
+
{{ transactionData.senderId }}
-
+
{{ formatEllipseHash(transactionData.senderId) }}
@@ -30,10 +30,10 @@
-
+
{{ transactionData.recipientId }}
-
+
{{ formatEllipseHash(transactionData.recipientId) }}
@@ -111,19 +111,5 @@ defineProps({
&__row:last-of-type &__table-header {
border-bottom: 0;
}
-
- &__hash {
- display: none;
-
- @media (--desktop) {
- display: inline;
- }
- }
-
- &__hash-ellipse {
- @media (--desktop) {
- display: none;
- }
- }
}
diff --git a/src/components/ValueHashEllipsed.vue b/src/components/ValueHashEllipsed.vue
index 3dbb5e231..42216a33b 100644
--- a/src/components/ValueHashEllipsed.vue
+++ b/src/components/ValueHashEllipsed.vue
@@ -1,30 +1,30 @@
-
+
- {{ formatEllipseHash(hash) }}
+ {{ formatKnownAddress(hash) }}
- {{ formatEllipseHash(hash) }}
+ {{ formatKnownAddress(hash) }}
{{ hash }}
-
+
- {{ formatEllipseHash(hash) }}
+ {{ formatKnownAddress(hash) }}
{{ hash }}
- {{ formatEllipseHash(hash) }}
+ {{ formatKnownAddress(hash) }}
{{ hash }}
@@ -34,10 +34,6 @@
-
-
diff --git a/src/utils/constants.js b/src/utils/constants.js
index a9a70c401..a01a45571 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -93,3 +93,19 @@ export const REMOVE_LIQUIDITY_CONTRACT_CALLS = [
'remove_liquidity',
'remove_liquidity_ae',
]
+export const KNOWN_ADDRESSES = [
+ { hash: 'ak_jgiBUko9fTwg5HQ8nHFoPbjR22TBcg9LK85qsv1mTkcjdszFa', name: 'CoinEx' },
+ { hash: 'ak_6sssiKcg7AywyJkfSdHz52RbDUq5cZe4V4hcvghXnrPz4H4Qg', name: 'Gate.io' },
+ { hash: 'ak_3oCNr4upswn5sRVpqdpuiCwxqwRU1tok2xLjLLy9vjvYRdVNd', name: 'MEXC' },
+ { hash: 'ak_dMyzpooJ4oGnBVX35SCvHspJrq55HAAupCwPQTDZmRDT5SSSW', name: 'WeTrue.io' },
+ { hash: 'ak_vKdT14HCiLCxuT3M7vf3QREyUbQTr1u6Pz49ba9EhaD6uDqWs', name: 'Huobi' },
+ { hash: 'ak_dnzaNnchT7f3YT3CtrQ7GUjqGT6VaHzPxpf2efHWPuEAWKcht', name: 'Binance' },
+ { hash: 'ak_wftXwsMheVNA33YWiYLqFNnSSDnYsV9ynqRSnZT8P3kgZG9bn', name: 'Hotbit' },
+ { hash: 'ak_wM8yFU8eSETXU7VSN48HMDmevGoCMiuveQZgkPuRn1nTiRqyv', name: 'WoolyPooly' },
+ { hash: 'ak_dArxCkAsk1mZB1L9CX3cdz1GDN4hN84L3Q8dMLHN4v8cU85TF', name: '2miners' },
+ { hash: 'ak_9MsbDuBTtKegKpj5uSxfPwmJ4YiN6bBdtXici682DgPk8ycpM', name: '2miners.solo' },
+ { hash: 'ak_2KAcA2Pp1nrR8Wkt3FtCkReGzAi8vJ9Snxa4PcmrthVx8AhPe8', name: 'BRI' },
+ { hash: 'ct_J3zBY8xxjsRr3QojETNw48Eb38fjvEuJKkQ6KzECvubvEcvCa', name: 'Superhero DEX' },
+ { hash: 'ct_azbNZ1XrPjXfqBqbAh1ffLNTQ1sbnuUDFvJrXjYz7JQA1saQ3', name: 'Superhero DEX' },
+ { hash: 'ct_2mfj3FoZxnhkSw5RZMcP8BfPoB1QR4QiYGNCdkAvLZ1zfF6paW', name: 'Superhero DEX' },
+]
diff --git a/src/utils/format.js b/src/utils/format.js
index 7c44399d9..7b0840e0e 100644
--- a/src/utils/format.js
+++ b/src/utils/format.js
@@ -130,3 +130,13 @@ export function formatIsAuction(name) {
const suffixLength = 6
return name.length - suffixLength < auctionLength
}
+
+export function formatKnownAddress(hash, isEllipsed = true) {
+ if (KNOWN_ADDRESSES.some(address => address.hash === hash)) {
+ return KNOWN_ADDRESSES.find(address => address.hash === hash).name
+ } else if (isEllipsed) {
+ return formatEllipseHash(hash)
+ } else {
+ return hash
+ }
+}
| | | | |