Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
nortonandreev committed Nov 13, 2024
1 parent a32b2f0 commit 6d319cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions web-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added gas settings validation on Unstake / Widthdraw Rewards flows [#2000]
- Add temporary link to the block explorer on the dashboard [#2883]

### Changed

Expand Down Expand Up @@ -333,6 +334,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#2878]: https://github.com/dusk-network/rusk/issues/2878
[#2879]: https://github.com/dusk-network/rusk/issues/2879
[#2880]: https://github.com/dusk-network/rusk/issues/2880
[#2883]: https://github.com/dusk-network/rusk/issues/2883
[#2888]: https://github.com/dusk-network/rusk/issues/2888
[#2920]: https://github.com/dusk-network/rusk/issues/2920

Expand Down
20 changes: 18 additions & 2 deletions web-wallet/src/routes/(app)/dashboard/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
} from "@mdi/js";
import { AnchorButton, Icon } from "$lib/dusk/components";
import { DashboardNav, Transactions } from "$lib/components";
import { settingsStore, walletStore } from "$lib/stores";
import { networkStore, settingsStore, walletStore } from "$lib/stores";
import { contractDescriptors } from "$lib/contracts";
import IconHeadingCard from "$lib/containers/Cards/IconHeadingCard.svelte";
import { page } from "$app/stores";
const { dashboardTransactionLimit, language } = $settingsStore;
const { networkName } = $networkStore;
/** @param {string} contract */
function getIconsForContract(contract) {
Expand Down Expand Up @@ -50,6 +52,20 @@
return icons;
}
function getExplorerPath() {
const isStaging = $page.url.href.includes("staging");
const baseUrl = isStaging ? "https://apps.staging" : "https://apps";
switch (networkName) {
case "devnet":
return `${baseUrl}.devnet.dusk.network/explorer`;
case "testnet":
return `${baseUrl}.testnet.dusk.network/explorer`;
default:
return `${baseUrl}.dusk.network/explorer`;
}
}
/** @type {ContractDescriptor[]} */
const enabledContracts = contractDescriptors.filter(
(contract) => contract.enabled === true
Expand Down Expand Up @@ -108,7 +124,7 @@

<AnchorButton
variant="tertiary"
href="https://apps.dusk.network/explorer"
href={getExplorerPath()}
text="Block Explorer"
rel="noopener noreferrer"
target="_blank"
Expand Down

0 comments on commit 6d319cf

Please sign in to comment.