Skip to content

Commit

Permalink
Merge pull request #576 from nemgrouplimited/main
Browse files Browse the repository at this point in the history
Release v0.5.0
  • Loading branch information
AnthonyLaw authored Aug 14, 2020
2 parents aa262da + 2895466 commit 3029090
Show file tree
Hide file tree
Showing 183 changed files with 24,636 additions and 14,010 deletions.
82 changes: 52 additions & 30 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,53 @@
module.exports = {
root: true,
env: {
node: true
},
extends: [
'plugin:vue/essential',
'@vue/standard'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'curly': ['error', 'multi-or-nest'],
'no-useless-escape': 'off',
'no-var': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always'
}],
'indent': ['error', 2],
'no-unused-expressions': 'off',
//'@typescript-eslint/no-unused-expressions': 'error'
},
globals: {
'globalConfig': true
},
parserOptions: {
parser: 'babel-eslint'
}
}
root: true,

env: {
node: true
},

extends: [
'plugin:vue/essential',
'@vue/standard',
// 'airbnb-base',
// 'plugin:prettier/recommended'
],

rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'curly': ['error', 'multi-or-nest'],
'no-useless-escape': 'off',
'no-var': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always'
}],
'indent': ['error', 'tab'],
'no-unused-expressions': 'off',
'no-tabs': 0,
'no-mixed-spaces-and-tabs': 0,
'semi': ['error', 'always'],
'newline-per-chained-call': ['error'],
'brace-style': ['error', 'stroustrup'],
// 'array-bracket-newline': ['error', { 'multiline': true, 'minItems': 2 }],
'newline-after-var': ['error', 'always'],
'vue/html-indent': ['error', 'tab', {
'attribute': 1,
'baseIndent': 1,
'closeBracket': 0,
'alignAttributesVertically': false,
'ignores': []
}]
// '@typescript-eslint/no-unused-expressions': 'error'

},

globals: {
'globalConfig': true
},

parserOptions: {
parser: 'babel-eslint'
}
}
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,48 @@ All notable changes to this project will be documented in this file.

The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [v0.5.0][v0.5.0] - 15-Aug-2020

### Milestone: [[email protected]](https://github.com/nemtech/catapult-server/releases/tag/v0.9.6.4)

Package | Version | Link
---|---|---
REST Core| v1.2.0 | [catapult-rest](https://github.com/nemtech/catapult-rest/releases/tag/v1.2.0)
SDK Core| v0.20.7 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)

### Added
- Added compatibility for 0.9.6.4 server.
- Added search Criteria for Blocks, Accounts, Namespaces, Transactions and Mosaics.
- Added PageAssembler component.
- Added Transaction filter component into transaction list.
- Added resolved address in transaction list and transaction detail page.
- Added more transaction test case for cypress e2e.
- Added Transaction Graphic widget to visualize transaction info
- Address Alias
- Mosaic Alias
- Namespace Registration
- TransferTransaction
- Added account filter component into account list.
- Added supplemental Keys info into Account Detail page.
- Added harvested info into Account Detail page.
- Added namespace filter component into namespace list.
- Added namespace name into alias transaction detail page.
- Added Merkle-tree infomation into Block Detail page.
- Added more japanese translations (Thanks @44uk).

### Update
- Refactor infrastructure to use `repositoryFactory`
- Refactor statistics chart effect.
- Load network config from network.
- Enhanced mobile view experience.

### Fixed
- Pagination. Block-list live update does not work [#555](https://github.com/nemgrouplimited/symbol-explorer/issues/555)
- Multisig account not showing correctly [#559](https://github.com/nemgrouplimited/symbol-explorer/issues/559)
- Transaction Detail. Unable to show the data [#562](https://github.com/nemgrouplimited/symbol-explorer/issues/562)
- Transaction Detail. Missing address in address alias [#534](https://github.com/nemgrouplimited/symbol-explorer/issues/534)
- PageAssembler. Mobile view doesn't work properly [#533](https://github.com/nemgrouplimited/symbol-explorer/issues/533)

## [v0.4.0][v0.4.0]

### Milestone: [[email protected]](https://github.com/nemtech/catapult-server/releases/tag/v0.9.5.1)
Expand Down Expand Up @@ -36,4 +78,5 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e


[v0.3.0]: https://github.com/nemfoundation/symbol-explorer/releases/tag/v0.3.0
[v0.4.0]: https://github.com/nemfoundation/symbol-explorer/releases/tag/v0.4.0
[v0.4.0]: https://github.com/nemfoundation/symbol-explorer/releases/tag/v0.4.0
[v0.5.0]: https://github.com/nemfoundation/symbol-explorer/releases/tag/v0.5.0
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Symbol Explorer

[![Build Status](https://travis-ci.com/nemfoundation/symbol-explorer.svg?branch=master)](https://travis-ci.com/nemfoundation/symbol-explorer)
[![Build Status](https://travis-ci.com/nemgrouplimited/symbol-explorer.svg?branch=main)](https://travis-ci.com/nemgrouplimited/symbol-explorer)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Symbol Explorer is a read-only web application to browse the content of the blockchain. The explorer supports searching for transactions, accounts, namespaces, mosaics, and blocks information on a given network.
Symbol Explorer is a read-only web application to browse the content of the blockchain.
The explorer supports searching for transactions, accounts, namespaces, mosaics, and blocks information on a given network.

## Requirements

Expand All @@ -14,7 +15,7 @@ Symbol Explorer is a read-only web application to browse the content of the bloc
1. Clone the project.

```
git clone https://github.com/nemfoundation/symbol-explorer.git
git clone https://github.com/nemgrouplimited/symbol-explorer.git
```

2. Install the required dependencies.
Expand Down Expand Up @@ -43,7 +44,7 @@ npm run dev

### How to change the node list

The file `/src/config/setup.json` contains the node list shown in the node selector dropdown.
The file `/src/config/setup.json.mt` contains the node list shown in the node selector dropdown.

1. Edit `peersApi.nodes` array to set up the custom node list.
2. Set `peersApi.defaultNode` property to the default node url.
Expand All @@ -58,8 +59,6 @@ Use the following available resources to get help:

## Contributing

This project is developed and maintained by NEM Foundation.

Contributions are welcome and appreciated.
Check [CONTRIBUTING](CONTRIBUTING.md) for information on how to contribute.

Expand All @@ -69,7 +68,7 @@ Copyright 2019-present NEM

Licensed under the [Apache License 2.0](LICENSE)

[self]: https://github.com/nemfoundation/symbol-explorer
[self]: https://github.com/nemgrouplimited/symbol-explorer
[docs]: https://nemtech.github.io
[issues]: https://github.com/nemfoundation/symbol-explorer/issues
[issues]: https://github.com/nemgrouplimited/symbol-explorer/issues
[slack]: https://join.slack.com/t/nem2/shared_invite/enQtMzY4MDc2NTg0ODgyLWZmZWRiMjViYTVhZjEzOTA0MzUyMTA1NTA5OWQ0MWUzNTA4NjM5OTJhOGViOTBhNjkxYWVhMWRiZDRkOTE0YmU
1 change: 1 addition & 0 deletions __tests__/config/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'isomorphic-fetch'
23 changes: 23 additions & 0 deletions __tests__/config/network.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"nodeUrl": "http://api-01.us-west-1.096x.symboldev.network:3000",
"marketDataUrl": "https://min-api.cryptocompare.com/",
"pagination": {
"pageSize": 25
},
"testAccount": {
"address": "TDS44G6KUHO7MODUB6E6WVJOK277QY65XCBJX5Y"
},
"testMosaic": {
"mosaicId": "5E62990DCAC5BE8A"
},
"testNamespace": {
"rootNamespace": "symbol",
"subNamespace": "symbol.xym"
},
"testBlock": {
"height": 1
},
"testTransactions":{
"transferTransactionHash": "38E7FF47113FAD41C019EF928168CCBF2707D5B894F8F588AAAE0C5A7AC369F5"
}
}
26 changes: 26 additions & 0 deletions __tests__/infrastructure/AccountService.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { AccountService } from '../../src/infrastructure'
import networkConfig from '../config/network.conf.json'
import { constructHttp } from '../utils'

beforeAll(async() => {
jest.setTimeout(10000)
await constructHttp()
});

describe('Account Service', () => {

describe('getAccountInfo should', () => {

it('return custom account object', async () => {
const accountInfo = await AccountService.getAccountInfo(networkConfig.testAccount.address)
expect(accountInfo).not.toBeNull()
})
})

describe('getAccountList should', () => {
it('return custom account list', async () => {
const accountList = await AccountService.getAccountList(networkConfig.pagination.pageSize, 'harvested/blocks')
expect(accountList).not.toBeNull()
})
})
})
27 changes: 27 additions & 0 deletions __tests__/infrastructure/BlockService.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { BlockService } from '../../src/infrastructure'
import networkConfig from '../config/network.conf.json'
import { constructHttp } from '../utils'

beforeAll(async() => {
jest.setTimeout(10000)
await constructHttp()
});

describe('Block Service', () => {

describe('getBlockInfo should', () => {

it('return custom block object', async () => {
const blockInfo = await BlockService.getBlockInfo(networkConfig.testBlock.height)
expect(blockInfo).not.toBeNull()
expect(blockInfo.height).toEqual(networkConfig.testBlock.height)
})
})

describe('getBlockList should', () => {
it('return custom block list', async () => {
const blockList = await BlockService.getBlockList(networkConfig.pagination.pageSize)
expect(blockList).not.toBeNull()
})
})
})
27 changes: 27 additions & 0 deletions __tests__/infrastructure/MosaicService.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { MosaicService } from '../../src/infrastructure'
import networkConfig from '../config/network.conf.json'
import { constructHttp } from '../utils'

beforeAll(async() => {
jest.setTimeout(10000)
await constructHttp()
});

describe('Mosaic Service', () => {

describe('getMosaicInfo should', () => {

it('return custom mosaic object', async () => {
const mosaicInfo = await MosaicService.getMosaicInfo(networkConfig.testMosaic.mosaicId)
expect(mosaicInfo).not.toBeNull()
expect(mosaicInfo.mosaicId).toEqual(networkConfig.testMosaic.mosaicId)
})
})

describe('getMosaicList should', () => {
it('return custom mosaic list', async () => {
const mosaicList = await MosaicService.getMosaicList(networkConfig.pagination.pageSize)
expect(mosaicList).not.toBeNull()
})
})
})
27 changes: 27 additions & 0 deletions __tests__/infrastructure/NamespaceService.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { NamespaceService } from '../../src/infrastructure'
import networkConfig from '../config/network.conf.json'
import { constructHttp } from '../utils'

beforeAll(async() => {
jest.setTimeout(10000)
await constructHttp()
});

describe('Namespace Service', () => {

describe('getNamespaceInfo should', () => {

it('return custom namespace object', async () => {
const namespace = await NamespaceService.getNamespaceInfo(networkConfig.testNamespace.rootNamespace)
expect(namespace).not.toBeNull()
expect(namespace.namespaceName).toEqual(networkConfig.testNamespace.rootNamespace)
})
})

describe('getNamespaceList should', () => {
it('return custom namespace list', async () => {
const namespaceList = await NamespaceService.getNamespaceList(networkConfig.pagination.pageSize)
expect(namespaceList).not.toBeNull()
})
})
})
27 changes: 27 additions & 0 deletions __tests__/infrastructure/TransactionService.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { TransactionService } from '../../src/infrastructure'
import networkConfig from '../config/network.conf.json'
import { constructHttp } from '../utils'

beforeAll(async() => {
jest.setTimeout(10000)
await constructHttp()
});

describe('Transaction Service', () => {

describe('getTransactionInfo should', () => {

it('return custom transaction object', async () => {
const transactionInfo = await TransactionService.getTransactionInfo(networkConfig.testTransactions.transferTransactionHash)
expect(transactionInfo).not.toBeNull()
expect(transactionInfo.transactionHash).toEqual(networkConfig.testTransactions.transferTransactionHash)
})
})

describe('getTransactionList should', () => {
it('return custom tranasaction list', async () => {
const transactionList = await TransactionService.getTransactionList(networkConfig.pagination.pageSize)
expect(transactionList).not.toBeNull()
})
})
})
7 changes: 7 additions & 0 deletions __tests__/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

import networkConfig from './config/network.conf.json'
import http from '../src/infrastructure/http'

export const constructHttp = async () => {
return await http.init(networkConfig.nodeUrl, networkConfig.marketDataUrl)
}
8 changes: 4 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
presets: [
'@vue/app'
]
};
4 changes: 2 additions & 2 deletions e2e/components/SearchBox.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ describe('Search Box component should', () => {
it('redirect to transaction detail page given correct transaction hash', () => {

cy.get('.search-box')
.type(config.testTransactions.transferTransactionHash)
.type(config.testTransactions.transferTransaction)
.type('{enter}')

cy.url()
.should('contain', `transaction/${config.testTransactions.transferTransactionHash}`)
.should('contain', `transaction/${config.testTransactions.transferTransaction}`)
})

it('redirect to account detail page given correct account address in plain format', () => {
Expand Down
Loading

0 comments on commit 3029090

Please sign in to comment.