Skip to content

Commit

Permalink
Merge pull request #154 from proximax-foundry/develop
Browse files Browse the repository at this point in the history
Release v1.1.8
  • Loading branch information
shinneng authored Feb 17, 2023
2 parents 50e1ad0 + 1650a29 commit 32d5169
Show file tree
Hide file tree
Showing 16 changed files with 375 additions and 254 deletions.
412 changes: 202 additions & 210 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "explorer",
"version": "1.1.7",
"version": "1.1.8",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down Expand Up @@ -30,8 +30,8 @@
"js-sha3": "^0.8.0",
"jsonwebtoken": "^8.5.1",
"jspdf": "^2.3.1",
"jszip": "^3.7.1",
"luxon": "^2.4.0",
"jszip": "^3.10.1",
"luxon": "^2.5.2",
"maska": "^1.4.1",
"mathjs": "^10.0.2",
"mitt": "^2.1.0",
Expand All @@ -45,7 +45,7 @@
"sass": "^1.46.0",
"sass-loader": "^7.3.1",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.3",
"tsjs-xpx-chain-sdk": "^0.9.16",
"tsjs-xpx-chain-sdk": "^0.9.18",
"tslib": "^2.3.1",
"utf-8-validate": "^5.0.9",
"v-tooltip": "^4.0.0-alpha.1",
Expand Down
Binary file modified public/ProximaX-Favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="<%= BASE_URL %>ProximaX-Favicon.png">
<link rel="icon" type="image/x-icon" href="<%= BASE_URL %>proximax-favicon.png">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body class="bg-gray-100">
Expand Down
24 changes: 24 additions & 0 deletions src/assets/img/sirius-explorer-logo-whitetext.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/assets/img/sirius-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/footerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="bg-blue-theme">
<div class="md:container mx-auto sm:grid-cols-2 lg:grid-cols-4 grid">
<div class="flex py-10 sm:col-span-2">
<div class="mx-3 sm:mx-7"><img src="@/assets/img/proximax-logo-footer.svg" class="w-7"></div>
<div class="mx-3 sm:mx-7"><img src="@/assets/img/sirius-icon.svg" class="w-7"></div>
<div>
<div class="text-xxs sm:text-xs text-white mb-5">Copyright 2022 ProximaX. All rights reserved.</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/headerComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="container mx-auto py-2">
<div class="md:flex md:justify-between">
<div class="flex items-center justify-center mb-3 md:mb-0">
<router-link :to="{name: 'Home'}"><img src="@/assets/img/proximax-logo.svg" class="w-40 mr-7"></router-link>
<router-link :to="{name: 'Home'}"><img src="@/assets/img/sirius-explorer-logo-whitetext.svg" class="w-40 mr-7"></router-link>
</div>
<div class="mx-3 md:mx-0">
<div class="border border-gray-300 my-1 searchbar flex bg-white">
Expand Down
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ app.component('ConfirmDialog', ConfirmDialog);
app.component('Toast', Toast);

const loadThemeConfig = async() => {
AppStateUtils.addNewReadyStates('theme');
try {
let config = await fetch('./themeConfig.json', {
headers: {
Expand All @@ -62,6 +63,7 @@ const loadThemeConfig = async() => {
loadThemeConfig();

const chainProfileIntegration = async () => {
AppStateUtils.addNewReadyStates('chainProfile');
try {
let networksInfo = await fetch('./chainProfile.json', {
headers: {
Expand Down
10 changes: 8 additions & 2 deletions src/models/util/transactionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3131,7 +3131,14 @@ export class TransactionUtils {
let formattedTxn: ConfirmedTransaction = new ConfirmedTransaction(txnHash);
formattedTxn.block = blockHeight;
formattedTxn.deadline = deadline;
formattedTxn.type = TransactionUtils.getTransactionTypeName(txn.type);

if(txn.transactionName==="UNKNOWN"){
formattedTxn.type = "UNKNOWN";
}
else{
formattedTxn.type = TransactionUtils.getTransactionTypeName(txn.type);
}

formattedTxn.maxFee = transactionInfo instanceof AggregateTransactionInfo ?
null : TransactionUtils.convertToExactNativeAmount(txn.maxFee.compact());

Expand All @@ -3145,7 +3152,6 @@ export class TransactionUtils {
}

formattedTxn.timestamp = new Date(blockInfo.timestamp.compact() + Deadline.timestampNemesisBlock * 1000).toISOString()

return formattedTxn;
}

Expand Down
22 changes: 11 additions & 11 deletions src/modules/account/components/AssetComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</div>
<div v-if="isPagination" class="ml-5 mr-5 sm:flex sm:justify-between my-5">
<div class="text-xs text-gray-700 mb-3 sm:mb-0 text-center sm:text-left">Show
<select v-model="pages" class="border border-gray-300 rounded-md p-1" @change="changeRows">
<select v-model="pageSize" class="border border-gray-300 rounded-md p-1" @change="changeRows">
<option value=10>10</option>
<option value=20>20</option>
<option value=30>30</option>
Expand Down Expand Up @@ -112,7 +112,7 @@ export default {
},
setup(prop){
const pages = ref(10);
const pageSize = ref(10);
const currentPage = ref(1)
const totalPages = ref(0);
const isFetching = ref(true);
Expand All @@ -123,7 +123,7 @@ export default {
// let pagination = (blocks)=>{
// let blockValue = blocks.slice((currentPage.value-1) * pages.value, currentPage.value * pages.value);
// let blockValue = blocks.slice((currentPage.value-1) * pageSize.value, currentPage.value * pageSize.value);
// return blockValue;
// }
// console.log(accountAssets.value);
Expand Down Expand Up @@ -194,22 +194,22 @@ export default {
let mosaics_list = [];
if(prop.accountAsset.length > 10){
isPagination.value = true;
mosaics_list = prop.accountAsset.slice((currentPage.value-1) * pages.value, currentPage.value * pages.value);
mosaics_list = prop.accountAsset.slice((currentPage.value-1) * pageSize.value, currentPage.value * pageSize.value);
}else{
mosaics_list = prop.accountAsset;
}
console.log(mosaics_list);
// console.log(mosaics_list);
let AssetList = await AccountUtils.formatAccountAsset(mosaics_list, prop.accountPublicKey);
accountAssets.value = AssetList;
console.log(pages.value);
// console.log(pageSize.value);
console.log(currentPage.value);
// console.log(currentPage.value);
totalPages.value = Math.ceil(prop.accountAsset.length / pages.value);
totalPages.value = Math.ceil(prop.accountAsset.length / pageSize.value);
isFetching.value = false;
console.log(totalPages.value);
console.log(prop.accountAsset.length);
// console.log(totalPages.value);
// console.log(prop.accountAsset.length);
}
loadAsset();
Expand All @@ -235,7 +235,7 @@ export default {
return{
splitBalance,
displayTokenName,
pages,
pageSize,
currentPage,
totalPages,
enableFirstPage,
Expand Down
26 changes: 14 additions & 12 deletions src/modules/block/views/ViewBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,21 @@ export default {
};
const loadBlock = async() =>{
if(!AppState.isReady){
setTimeout(loadBlock, 1000);
return;
}
const block = await BlockUtils.getBlockByHeight(p.blockHeight);
if(!AppState.isReady){
setTimeout(loadBlock, 1000);
return;
}
if(block){
blockInfo.value = block;
isShowInvalid.value = false;
}else{
isShowInvalid.value = true;
}
getTransactions();
if(block){
blockInfo.value = block;
isShowInvalid.value = false;
}else{
isShowInvalid.value = true;
}
getTransactions();
};
loadBlock();
Expand Down
78 changes: 75 additions & 3 deletions src/modules/search/views/ViewInvalidSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
<div class="pb-14">
<p class="text-gray-500 mb-5 text-sm font-bold">Search not found</p>
<div class="p-3 bg-yellow-100 text-yellow-700">{{ searchType }} is not found in {{ networkName }}</div>
<div class="txn-div">
<div>
<div id="raw"></div>
</div>
</div>
</div>
</template>

<script>
import { computed, defineComponent, getCurrentInstance, inject, ref, watch } from "vue";
import { networkState } from '@/state/networkState';
import { ChainProfile } from "@/models/stores/chainProfile";
export default {
name: 'ViewInvalidSearch',
props: {
Expand All @@ -18,7 +24,7 @@ export default {
const networkName = computed(() => {
return networkState.chainNetworkName;
});
const searchType = ref('Search');
switch (props.type){
case 'Hash':
Expand All @@ -44,10 +50,76 @@ export default {
break;
}
let currentChainProfile = new ChainProfile(networkState.chainNetworkName);
currentChainProfile.init();
const BASE_URL = 'https://'+currentChainProfile.apiNodes[0]+'/transactions/confirmed/'+ props.param
async function fetchToDo(BASE_URL){
const response=await fetch(BASE_URL);
// fetching the reponse body data
const data = response.json();
return data
}
function displayValue(data){
let rawData = '',
f = {
brace: 0
};
rawData=data.replace(/({|}[,]*|[^{}:]+:[^{}:,]*[,{]*)/g, function (m, p1) {
var rtnFn = function() {
return '<div style="text-indent: ' + (f['brace'] * 20) + 'px;">' + p1 + '</div>';
},
rtnStr = 0;
if (p1.lastIndexOf('{') === (p1.length - 1)) {
rtnStr = rtnFn();
f['brace'] += 1;
} else if (p1.indexOf('}') === 0) {
f['brace'] -= 1;
rtnStr = rtnFn();
} else {
rtnStr = rtnFn();
}
return rtnStr;
});
const rawDiv=document.getElementById("raw")
rawDiv.innerHTML=rawData
}
fetchToDo(BASE_URL).then((value) => {
const data = JSON.stringify(value)
displayValue(data)
});
return {
networkName,
searchType
searchType,
}
}
}
</script>

<style scoped lang="scss">
.txn-div, .details{
@apply text-gray-800 text-xs;
> div{
@apply flex items-center border-b border-gray-100 py-4;
> div:first-child{
@apply w-40 text-xs pl-4;
}
> div:nth-child(2){
@apply text-xs w-full;
}
> div:last-child{
@apply border-none;
}
}
}
</script>
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<Column field="In/Out" header="IN/OUT" headerStyle="width:100px" v-if="wideScreen && accountAddress">
<template #body="{data}">
<div class="ml-2">
<img src="@/modules/transaction/img/icon-txn-out.svg" class="inline-block" v-if="data.sender === Helper.createAddress(accountAddress).plain()">
<img src="@/modules/transaction/img/icon-txn-in.svg" class="inline-block" v-else>
<img src="@/modules/transaction/img/icon-txn-out.svg" class="inline-block" v-if="data.sender === Helper.createAddress(accountAddress).plain() && data.type === 'Transfer'">
<img src="@/modules/transaction/img/icon-txn-in.svg" class="inline-block" v-else-if="data.sender != Helper.createAddress(accountAddress).plain() && data.type === 'Transfer'">
</div>
</template>
</Column>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/transaction/views/ViewTransaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default {
status: transaction.txnStatus.status?transaction.txnStatus.status:'',
timestamp: transaction.txn.timestamp,
height: transaction.txn.transactionInfo.height.compact(),
type: TransactionUtils.getTransactionTypeName(transaction.txn.type),
type: TransactionUtils.getTransactionTypeName(transaction.txn.type)? TransactionUtils.getTransactionTypeName(transaction.txn.type): "UNKNOWN",
fee: Helper.convertToExact(transaction.txn.fee, AppState.nativeToken.divisibility),
signature: transaction.txn.signature,
signer: transaction.txn.signer.address.address,
Expand Down
Loading

0 comments on commit 32d5169

Please sign in to comment.