Skip to content

Commit

Permalink
Merge branch 'develop' into DEX-Trades-General
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek authored Aug 1, 2024
2 parents 81b33ad + f211ebc commit 5f47728
Show file tree
Hide file tree
Showing 141 changed files with 4,779 additions and 3,357 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*
!src
!index.html
!nuxt.config.ts
!package.json
!tsconfig.json
!yarn.lock
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default defineConfig({
},
viewportWidth: 1280,
viewportHeight: 720,
defaultCommandTimeout: 30000,
defaultCommandTimeout: 40000,
})
3 changes: 3 additions & 0 deletions cypress/e2e/app/aeCoin.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ describe('ae coin', () => {

cy.get('.ae-coin-panel table').should('be.visible')
cy.get('.ae-coin-transactions-panel .paginated-content').should('be.visible')

cy.contains('.tabs__item', 'Markets').click()
cy.get('.ae-coin-transactions-panel table').should('be.visible')
})
})
7 changes: 7 additions & 0 deletions cypress/e2e/app/nodes.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
describe('nodes', () => {
it('should display nodes', () => {
cy.visit('/nodes')

cy.get('.nodes-table').should('be.visible')
})
})
7 changes: 7 additions & 0 deletions cypress/e2e/app/topAccounts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
describe('top accounts', () => {
it('should display top accounts', () => {
cy.visit('/accounts')

cy.get('.top-accounts-table').should('be.visible')
})
})
52 changes: 26 additions & 26 deletions .eslintrc.js → eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
ecmaVersion: 2020,
extraFileExtensions: ['.vue'],
ecmaFeatures: {
jsx: false,
},
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
extends: [
'standard',
'plugin:vue/base',
'plugin:vue/vue3-recommended',
'plugin:import/recommended',
'eslint:recommended',
'@nuxtjs/eslint-config-typescript',
],
plugins: ['prettier'],
files: ["src/*.ts", "src/*.js", "src/*.vue"],
// parser: 'vue-eslint-parser',
// parserOptions: {
// ecmaVersion: 2020,
// extraFileExtensions: ['.vue'],
// ecmaFeatures: {
// jsx: false,
// },
// },
// globals: {
// defineProps: 'readonly',
// defineEmits: 'readonly',
// defineExpose: 'readonly',
// withDefaults: 'readonly',
// },
// extends: [
// 'standard',
// 'plugin:vue/base',
// 'plugin:vue/vue3-recommended',
// 'plugin:import/recommended',
// 'eslint:recommended',
// '@nuxtjs/eslint-config-typescript',
// ],
// plugins: ['prettier'],
rules: {
'no-console': 'off',
quotes: ['error', 'single'],
Expand Down Expand Up @@ -64,14 +64,14 @@ module.exports = {
}],
'vue/max-attributes-per-line': ['error', {
singleline: 1,
multiline: { max: 1 },
multiline: {max: 1},
}],
'vue/require-v-for-key': 'error',
'vue/no-v-html': 0,
semi: ['error', 'never'],
camelcase: ['error', {
properties: 'never',
}],
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreStrings: true, ignoreTemplateLiterals: true }],
'max-len': ['error', {code: 120, ignoreUrls: true, ignoreStrings: true, ignoreTemplateLiterals: true}],
},
}
27 changes: 22 additions & 5 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs/promises'
import { compileTemplate } from 'vue/compiler-sfc'
import { sentryVitePlugin } from '@sentry/vite-plugin'
import {compileTemplate} from 'vue/compiler-sfc'
import {sentryVitePlugin} from '@sentry/vite-plugin'

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
Expand All @@ -9,6 +9,15 @@ export default defineNuxtConfig({
devServer: {
port: 8080,
},
nitro: {
routeRules: {
"/proxy/avatar/**": {proxy: 'https://avatars.z52da5wt.xyz/**', cors: true,},
'/proxy/nodes': {proxy: 'http://138.68.22.27:3113/v2/debug/network', cors: true},
'/proxy/gate': {proxy: 'https://api.gateio.ws/api/v4/spot/tickers?currency_pair=AE_USDT', cors: true},
'/proxy/mexc': {proxy: 'https://api.mexc.com/api/v3/ticker/24hr?symbol=AEUSDT', cors: true},
'/proxy/coinw': {proxy: 'https://api.coinw.com/api/v1/public?command=returnTicker', cors: true},
},
},
modules: [
'@pinia/nuxt',
'@nuxtjs/plausible',
Expand All @@ -35,6 +44,7 @@ export default defineNuxtConfig({
WEBSOCKET_URL: process.env.WEBSOCKET_URL,
DEX_BACKEND_URL: process.env.DEX_BACKEND_URL,
NETWORK_NAME: process.env.NETWORK_NAME,
NETWORK_ID: process.env.NETWORK_ID,
ALTERNATIVE_NETWORK_URL: process.env.ALTERNATIVE_NETWORK_URL,
ALTERNATIVE_NETWORK_NAME: process.env.ALTERNATIVE_NETWORK_NAME,
AE_TOKEN_ID: process.env.AE_TOKEN_ID,
Expand All @@ -43,6 +53,7 @@ export default defineNuxtConfig({
SH_DEX_CONTRACTS: process.env.SH_DEX_CONTRACTS?.split(';'),
},
},

postcss: {
plugins: {
autoprefixer: {},
Expand All @@ -56,9 +67,9 @@ export default defineNuxtConfig({
},
sourcemap: true,
vite: {
build: { target: 'es2020' },
build: {target: 'es2020'},
optimizeDeps: {
esbuildOptions: { target: 'es2020' },
esbuildOptions: {target: 'es2020'},
},
define: {
__VUE_PROD_DEVTOOLS__: process.env.MODE !== 'production',
Expand All @@ -72,13 +83,14 @@ export default defineNuxtConfig({
return
}

const { code } = compileTemplate({
const {code} = compileTemplate({
id: JSON.stringify(path),
filename: path,
source: await fs.readFile(path, 'utf-8'),
transformAssetUrls: false,
})


return `${code}\nexport default { render: render }`
},
},
Expand All @@ -96,10 +108,15 @@ export default defineNuxtConfig({
}),
],
},

monacoEditor: {
locale: 'en',
componentName: {
codeEditor: 'MonacoEditor',
},
},


compatibilityDate: '2024-07-16',

})
63 changes: 31 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint": "yarn lint:js && yarn lint:style",
"lint:ci": "yarn lint:js --max-warnings=0 && yarn lint:style --mw 0",
"lint:fix": "yarn lint:js --fix && yarn lint:style --fix",
"lint:js": "eslint --ext .ts,.js,.vue src",
"lint:js": "eslint",
"lint:style": "stylelint \"./src/**/*.vue\" \"src/**/*.css\"",
"reinstall": "rm -rf node_modules/ && yarn cache clean && yarn install",
"reset": "yarn reinstall && yarn dev",
Expand All @@ -30,40 +30,39 @@
},
"dependencies": {
"@aeternity/aepp-sdk": "^13.3.2",
"@download/blockies": "^1.0.3",
"@sentry/tracing": "^7.108.0",
"@sentry/vite-plugin": "^2.16.1",
"@sentry/vue": "^7.108.0",
"@vuepic/vue-datepicker": "^8.3.1",
"@vueuse/core": "^10.9.0",
"@sentry/tracing": "^7.114.0",
"@sentry/vite-plugin": "^2.21.1",
"@sentry/vue": "^8.17.0",
"@vuepic/vue-datepicker": "^9.0.0",
"@vueuse/core": "^10.11.0",
"@vueuse/head": "^2.0.0",
"axios": "^1.6.8",
"axios": "^1.7.2",
"bignumber.js": "9.1.2",
"camelcase-keys-deep": "^0.1.0",
"chart.js": "^4.4.2",
"chart.js": "^4.4.3",
"compression": "^1.7.4",
"core-js": "^3.36.1",
"core-js": "^3.37.1",
"express": "^4.19.2",
"floating-vue": "^5.2.2",
"luxon": "^3.4.4",
"memory-cache": "^0.2.0",
"nuxt-booster": "^3.0.15",
"nuxt-booster": "^3.0.16",
"pinia": "^2.1.7",
"swiper": "^11.0.7",
"vue": "^3.4.21",
"vue-chartjs": "^5.3.0",
"vue-multiselect": "^3.0.0-beta.1",
"vue-router": "^4.3.0"
"swiper": "^11.1.5",
"vue": "^3.4.31",
"vue-chartjs": "^5.3.1",
"vue-multiselect": "^3.0.0",
"vue-router": "^4.4.0"
},
"devDependencies": {
"@csstools/postcss-global-data": "^2.1.1",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/partytown": "^1.5.0",
"@nuxtjs/plausible": "^0.2.4",
"@nuxtjs/plausible": "^1.0.0",
"@pinia/nuxt": "^0.5.1",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue": "^5.0.5",
"autoprefixer": "^10.4.19",
"cypress": "^13.8.1",
"cypress": "^13.13.0",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -72,23 +71,23 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.24.0",
"monaco-editor": "^0.47.0",
"nuxt": "^3.11.1",
"nuxt-monaco-editor": "^1.2.7",
"postcss": "^8.4.38",
"postcss-custom-media": "^10.0.4",
"postcss-html": "^1.6.0",
"monaco-editor": "^0.50.0",
"nuxt": "^3.12.3",
"nuxt-monaco-editor": "^1.2.9",
"postcss": "^8.4.39",
"postcss-custom-media": "^10.0.8",
"postcss-html": "^1.7.0",
"postcss-import": "^16.1.0",
"postcss-load-config": "^5.0.3",
"postcss-load-config": "^6.0.1",
"postcss-nested": "^6.0.1",
"prettier": "^3.2.5",
"prettier": "^3.3.3",
"rollup-plugin-ternary": "^2.0.1",
"stylelint": "^16.3.1",
"stylelint-config-recommended": "^14.0.0",
"stylelint": "^16.7.0",
"stylelint-config-recommended": "^14.0.1",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.0",
"typescript": "^5.4.3",
"vite": "^5.2.6",
"stylelint-config-standard": "^36.0.1",
"typescript": "^5.5.3",
"vite": "^5.3.4",
"vite-plugin-html": "^3.2.2"
},
"browserslist": [
Expand Down
6 changes: 5 additions & 1 deletion src/assets/ae-token.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/assets/styles/elements/_table.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ td {
vertical-align: middle;

@media (--desktop) {
padding: 10px var(--space-0) var(--space-1);
padding: 10px var(--space-0) var(--space-1) 0;
}
}

Expand Down
15 changes: 6 additions & 9 deletions src/components/AccountActivityDataCellAex9TransferEvent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
<value-hash-ellipsed
:hash="activityPayload.contractId"
:link-to="`/contracts/${activityPayload.contractId}`"/>

<app-chip size="sm">
{{ tokenValue }}
</app-chip>
<price-label
:price="tokenValue"
:contract-id="activityPayload.contractId"
:currency="activityPayload.tokenSymbol"/>
</template>

<script setup>
import { formatNumber, formatReduceDecimals } from '@/utils/format'
import AppChip from '@/components/AppChip'
import { formatReduceDecimals } from '@/utils/format'
import ValueHashEllipsed from '@/components/ValueHashEllipsed'
const props = defineProps({
Expand All @@ -26,8 +25,6 @@ const props = defineProps({
const activityPayload = computed(() => props.activity.payload)
const tokenValue = computed(() =>
formatNumber(
formatReduceDecimals(activityPayload.value.amount, activityPayload.value.decimals),
) + ` ${activityPayload.value.tokenSymbol}`,
formatReduceDecimals(activityPayload.value.amount, activityPayload.value.decimals),
)
</script>
8 changes: 3 additions & 5 deletions src/components/AccountActivityDataCellContractCallTxEvent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
{{ activity.payload.tx.function }}
</app-chip>

<app-chip
<price-label
v-if="activity.payload.tx.amount !== 0"
size="sm">
{{ formatAePrice(formatAettosToAe(activity.payload.tx.amount)) }}
</app-chip>
:price="formatAettosToAe(activity.payload.tx.amount)"/>
</template>

<script setup>
import ValueHashEllipsed from '@/components/ValueHashEllipsed'
import { formatAePrice, formatAettosToAe } from '@/utils/format'
import { formatAettosToAe } from '@/utils/format'
defineProps({
activity: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
:link-to="`/contracts/${activityPayload.contractId}`"/>
<template v-if="activityPayload.function === 'Chain.spend'">
<transaction-arrow-right-icon/>
<app-chip size="sm">
{{ formatAePrice(formatAettosToAe(activityPayload.internalTx.amount)) }}
</app-chip>
<price-label :price="formatAettosToAe(activityPayload.internalTx.amount)"/>
</template>
<app-chip size="sm">
{{ activityPayload.function }}
Expand All @@ -15,6 +13,7 @@

<script setup>
import ValueHashEllipsed from '@/components/ValueHashEllipsed'
import { formatAettosToAe } from '@/utils/format'
const props = defineProps({
activity: {
Expand Down
Loading

0 comments on commit 5f47728

Please sign in to comment.