web/storagenode: zksync era compatible links wallet/transactions
Change-Id: I9079ca20e4d95abedbcf04c0d8529a0f2c6ac938
This commit is contained in:
parent
df53914faa
commit
3e3ec2358d
@ -12,7 +12,7 @@
|
|||||||
<p class="wallet-area__wallet-address-section__bold-text">{{ walletAddress }}</p>
|
<p class="wallet-area__wallet-address-section__bold-text">{{ walletAddress }}</p>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
v-if="!isZkSyncEnabled"
|
v-if="(!isZkSyncEnabled && !isZkSyncEraEnabled)"
|
||||||
class="wallet-area__button"
|
class="wallet-area__button"
|
||||||
:href="`https://etherscan.io/address/${walletAddress}#tokentxns`"
|
:href="`https://etherscan.io/address/${walletAddress}#tokentxns`"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
>
|
>
|
||||||
<b class="wallet-area-button-label">View on Etherscan</b>
|
<b class="wallet-area-button-label">View on Etherscan</b>
|
||||||
</a>
|
</a>
|
||||||
<div v-else class="wallet-area__buttons-area">
|
<div v-else-if="isZkSyncEnabled" class="wallet-area__buttons-area">
|
||||||
<a
|
<a
|
||||||
class="wallet-area__button"
|
class="wallet-area__button"
|
||||||
:href="`https://zkscan.io/explorer/accounts/${walletAddress}`"
|
:href="`https://zkscan.io/explorer/accounts/${walletAddress}`"
|
||||||
@ -42,6 +42,28 @@
|
|||||||
<p class="wallet-area__buttons-area__active-wallet-area__label">zkSync is opted-in</p>
|
<p class="wallet-area__buttons-area__active-wallet-area__label">zkSync is opted-in</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="isZkSyncEraEnabled" class="wallet-area__buttons-area">
|
||||||
|
<a
|
||||||
|
class="wallet-area__button"
|
||||||
|
:href="`https://explorer.zksync.io/address/${walletAddress}`"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<b class="wallet-area-button-label">View on ZkSync Era explorer</b>
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
class="wallet-area__button"
|
||||||
|
:href="`https://etherscan.io/address/${walletAddress}#tokentxns`"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<b class="wallet-area-button-label">View on Etherscan</b>
|
||||||
|
</a>
|
||||||
|
<div class="wallet-area__buttons-area__active-wallet-area">
|
||||||
|
<CheckIcon class="wallet-area__buttons-area__active-wallet-area__icon" />
|
||||||
|
<p class="wallet-area__buttons-area__active-wallet-area__label">zkSync Era is opted-in</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -67,7 +89,11 @@ export default class WalletArea extends Vue {
|
|||||||
private readonly walletFeatures: string[];
|
private readonly walletFeatures: string[];
|
||||||
|
|
||||||
public get isZkSyncEnabled(): boolean {
|
public get isZkSyncEnabled(): boolean {
|
||||||
return this.walletFeatures.includes('zksync');
|
return this.walletFeatures.includes('zksync') && !this.isZkSyncEraEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get isZkSyncEraEnabled(): boolean {
|
||||||
|
return this.walletFeatures.includes('zksync-era');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -307,10 +307,11 @@ export class SatellitePayoutForPeriod {
|
|||||||
{
|
{
|
||||||
const zkScanUrl = 'https://zkscan.io/explorer/transactions';
|
const zkScanUrl = 'https://zkscan.io/explorer/transactions';
|
||||||
|
|
||||||
if (this.receipt.indexOf('zksync') !== -1) {
|
if (this.receipt.indexOf('zksync-era') !== -1) {
|
||||||
|
return `https://explorer.zksync.io/tx/${prefixed(this.receipt.slice(11))}`;
|
||||||
|
} else if (this.receipt.indexOf('zksync') !== -1) {
|
||||||
return `${zkScanUrl}/${prefixed(this.receipt.slice(7))}`;
|
return `${zkScanUrl}/${prefixed(this.receipt.slice(7))}`;
|
||||||
}
|
} else if (this.receipt.indexOf('zkwithdraw') !== -1) {
|
||||||
if (this.receipt.indexOf('zkwithdraw') !== -1) {
|
|
||||||
return `${zkScanUrl}/${prefixed(this.receipt.slice(11))}`;
|
return `${zkScanUrl}/${prefixed(this.receipt.slice(11))}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user