diff --git a/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue b/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue index 81ad8529..5e6acd88 100644 --- a/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue +++ b/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue @@ -56,7 +56,7 @@ function showInfo(address: string) {
- + diff --git a/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue b/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue index 3428a1ac..ddf9aac4 100644 --- a/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue +++ b/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue @@ -36,6 +36,20 @@ const balances = ref({} as PaginatedBalances) const contractAddress = String(route.query.contract) +const history = JSON.parse(localStorage.getItem("contract_history") || "{}") + +if(history[chainStore.chainName]) { + if(!history[chainStore.chainName].includes(contractAddress)) { + history[chainStore.chainName].push(contractAddress) + if(history[chainStore.chainName].length > 10) { + history[chainStore.chainName].shift() + } + } +} else { + history[chainStore.chainName] = [contractAddress] +} +localStorage.setItem("contract_history", JSON.stringify(history)) + onMounted(() => { const address = contractAddress wasmStore.wasmClient.getWasmContracts(address).then((x) => { @@ -137,7 +151,7 @@ const result = ref({});
- Back + Back
-

Transactions

+

Transactions

{{ $t('cosmwasm.contract_list') }} {{ $t('account.action') }}
- + diff --git a/src/modules/[chain]/cosmwasm/index.vue b/src/modules/[chain]/cosmwasm/index.vue index 8644408b..ddb4b6a0 100644 --- a/src/modules/[chain]/cosmwasm/index.vue +++ b/src/modules/[chain]/cosmwasm/index.vue @@ -1,7 +1,7 @@
{{ $t('ibc.height') }} {{ $t('ibc.txhash') }}