Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add Metadata management #743

Closed
wants to merge 93 commits into from
Closed
Show file tree
Hide file tree
Changes from 87 commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
da5d68b
fix: update metadata
Slesarew Mar 10, 2021
ecd983d
docs: created issue for stock metadata updates
Slesarew Mar 10, 2021
f1bd13f
docs: lint
Slesarew Mar 10, 2021
6aefe61
feat: add generalized metadata storage mwp
Slesarew Mar 12, 2021
761561d
feat: metadata info on network details page (early stub)
Slesarew Mar 16, 2021
34acbe5
feat: invalid metadata message
Slesarew Mar 16, 2021
a2d4b6d
feat: built-in metadata loaded in constants
Slesarew Mar 17, 2021
0330817
Merge branch 'master' into metadata-management
Slesarew Mar 19, 2021
3a373d7
Merge branch 'master' into metadata-management
Slesarew Mar 19, 2021
1d069b2
fix!: metadata is actuallty loaded;
Slesarew Mar 19, 2021
be21e51
fix: annoying hooks warning about updating component from another com…
Slesarew Mar 22, 2021
9754f1d
fix: smoother metadata loading; initiation moved to separate from fet…
Slesarew Mar 22, 2021
78a12e4
ref: merged networkscontext and registriescontext
Slesarew Mar 23, 2021
b5cc792
fix: remove process race on init and small fixes
Slesarew Mar 24, 2021
87c0b8a
fix: infinite useEffect cycle in payload card; probably there is more
Slesarew Mar 24, 2021
78c99d8
feat: show list of available metadata packages for given network
Slesarew Mar 25, 2021
5e90750
feat: choose metadata from network settings submenu
Slesarew Mar 25, 2021
41eae4e
test: fix typos in unit tests
Slesarew Mar 25, 2021
b20c3bd
test: fix tests and some lint/type errors
Slesarew Mar 26, 2021
95a0b2d
feat: Metadata management scanner (#749)
Slesarew Apr 26, 2021
32b2485
refactor: faster metadata queries (#759)
Slesarew Apr 27, 2021
4cb7d39
feat: Metadata management page (#760)
Slesarew Apr 28, 2021
d0c1bbf
build: Upgrade polkadot-js 4 7 2 (#761)
Slesarew May 3, 2021
8619f6b
build: bump node version for e2e
Slesarew May 3, 2021
cbe8a74
build: bump node version in bitrise.yml
Slesarew May 3, 2021
97002d6
test: teach signing test to scroll down
Slesarew May 4, 2021
7aa668a
test: fix addNewNetwork signing test with scrolling
Slesarew May 4, 2021
d1770ab
test: forgot to import scrolling tap everywhere it's needed
Slesarew May 4, 2021
59dc5d5
fix: update westend metadata
Slesarew May 4, 2021
472728d
build: build rust for detox
Slesarew May 4, 2021
44f550e
build: try to fix comment in macro build issue for zeroize_derive
Slesarew May 4, 2021
dc37f0c
fix: typu in NetworkContext file
Slesarew May 4, 2021
edeb8a0
build: update synstructure rust dep
Slesarew May 4, 2021
17c0cdc
build: disable 32-bit ios targets
Slesarew May 5, 2021
97d9189
build: remoce macro proc so that cross-compile works
Slesarew May 5, 2021
f301f73
build: very ugly hack to address ios inability to build dynamic libs …
Slesarew May 5, 2021
e3f2f28
Merge branch 'master' into metadata-management
Slesarew May 5, 2021
6bf27a3
fix: update metadata
Slesarew May 6, 2021
bc85a10
feat: loading screen stub
Slesarew May 6, 2021
57e0e12
lint
Slesarew May 6, 2021
088d6b3
fix: import react to splashscreen tab
Slesarew May 6, 2021
2e458ee
fix: metadata qr alignment error
Slesarew May 6, 2021
cb10f79
test: increase e2e timeout
Slesarew May 6, 2021
9943b92
feat: loaded metadata preview screen
Slesarew May 7, 2021
0fb50e4
test: switch ios and android e2e tests order
Slesarew May 7, 2021
27b697c
test: add waiting for loading in beforeall e2e
Slesarew May 7, 2021
5c0f81d
fix: lint
Slesarew May 7, 2021
5b4860a
test: typo
Slesarew May 7, 2021
03ad401
fix: update metadata
Slesarew May 10, 2021
cf23644
test: preparing for new e2e tests
Slesarew May 10, 2021
1849e96
docs: bump license year in ts
Slesarew May 10, 2021
9e06137
docs: bump license year in ios
Slesarew May 10, 2021
199f253
docs: bump version year in rust
Slesarew May 10, 2021
b4f439e
fix: gracefully fail to parse transaction if no metadata is available
Slesarew May 10, 2021
3ea1020
test: fix gradle api for detox
Slesarew May 10, 2021
5b1e44a
test: remove waiting for alerts
Slesarew May 10, 2021
eba8822
fix: lint
Slesarew May 10, 2021
3a9fe2d
feat: slightly prettier loading screen
Slesarew May 10, 2021
86f2ccb
fix: lint
Slesarew May 10, 2021
11202e9
fix: properly handle networks with unset metadata on loading
Slesarew May 11, 2021
7d7c90b
fix: #767 and some lint
Slesarew May 11, 2021
7cebcf3
fix: lint and types
Slesarew May 11, 2021
2eb2804
feat: slightly prettier transaction parser
Slesarew May 11, 2021
f37363e
fix: types and lint
Slesarew May 12, 2021
068121b
test: attempt to run e2e on bitrise
Slesarew May 12, 2021
9e090b3
test: bump node version on bitrise
Slesarew May 12, 2021
ac0ab1c
test: swap ios and android testing again
Slesarew May 12, 2021
8d07761
build: automatically set NDK_HOME with other variables
Slesarew May 12, 2021
e8fcd3a
test: download last reasonable config from bitrise
Slesarew May 12, 2021
0533ec0
test: increase verbosity in e2e test
Slesarew May 12, 2021
feb66cd
test: increase verbosity for e2e ci test on github
Slesarew May 12, 2021
31bbe5b
test: wait for chooser screen after account creation in e2e
Slesarew May 12, 2021
e1a5dca
test: this will be reverted - check that ios really clears memory bet…
Slesarew May 14, 2021
ce65159
fix: lint and ios build
Slesarew May 17, 2021
5fecee2
test: preparing for new tests
Slesarew May 17, 2021
483c6ae
build: ios version fix attempt
Slesarew May 17, 2021
eaaf50f
build: fixing ios build
Slesarew May 17, 2021
4ca0558
build: rename xcode folders
Slesarew May 17, 2021
323581f
build: update some deps
Slesarew May 17, 2021
5495eaa
build: remove ios/SubstrateSignTests
Slesarew May 17, 2021
841db86
fix: reverse ios module renaming mess
Slesarew May 17, 2021
3b47bde
build: ios folder cleanup
Slesarew May 17, 2021
bb9720d
build: move swift-bridge header around
Slesarew May 17, 2021
ba4ac65
fix: Bridging header location
Slesarew May 18, 2021
770611c
fix: libsigner.a location
Slesarew May 18, 2021
f43e5d2
build: try different places for static ios rust lib
Slesarew May 18, 2021
5c87e0b
build: remove ndk address and some file duplicates
Slesarew May 18, 2021
d1314db
build: ios linking
Slesarew May 20, 2021
3b104bf
test: some unfinished test specs added
Slesarew May 21, 2021
4db2ec6
build: manually return linking lines to ios project file
Slesarew May 27, 2021
97c1b3a
feat: migrate metadata db to insecure storage
Slesarew May 27, 2021
2595969
fix: accept V13 metadata
Slesarew May 27, 2021
233b258
chore: update metadata
Slesarew May 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 94 additions & 85 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,90 +1,99 @@
const commonRules = {
"no-bitwise": "off",
"comma-dangle": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"quotes": ["error", "single", { "avoidEscape": true }],
"react-native/no-inline-styles": "off",
"sort-keys": ["error", "asc", {"caseSensitive": true, "natural": false, "minKeys": 2}],
"import/order": ["error", {
"newlines-between": "always"
}]
'comma-dangle': ['error', 'never'],
'import/order': [
'error',
{
'newlines-between': 'always'
}
],
'no-bitwise': 'off',
'object-curly-spacing': ['error', 'always'],
quotes: ['error', 'single', { avoidEscape: true }],
'react-native/no-inline-styles': 'off',
'sort-keys': [
'error',
'asc',
{ caseSensitive: true, minKeys: 2, natural: false }
]
};

module.exports = {
extends: [
"@react-native-community",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
globals: { inTest: "writable" },
overrides: [
{
files: ["e2e/*.spec.js", "e2e/init.js", "e2e/utils.js"],
rules: {
"no-undef": "off"
}
},
{
files: ["**/*.ts", "**/*.tsx"],
env: { "browser": true, "es6": true, "node": true },
extends: [
"@react-native-community",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: { "jsx": true },
ecmaVersion: 2018,
sourceType: "module",
project: "./tsconfig.json"
},
plugins: ["@typescript-eslint", "react-hooks"],
rules: {
...commonRules,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/no-use-before-define": ["error", { "variables": false }], // enable defining variables after react component;
"@typescript-eslint/no-non-null-assertion": 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/ban-ts-ignore': 0,
"no-void": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"semi": "off"
}
}
],
parserOptions: {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
},
settings: {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"typescript": {
"alwaysTryTypes": true // always try to resolve types under `<roo/>@types` directory even it doesn't contain any source code, like `@types/unist`
},
},
"import/ignore": "react-navigation",
react: {
"pragma": "React", // Pragma to use, default to "React"
"version": "16.9.0", // React version, default to the latest React stable release
},
},
rules: {
...commonRules,
"no-unused-vars": ["error", { "args": "none" }],
}
extends: [
'@react-native-community',
'plugin:prettier/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript'
],
globals: { inTest: 'writable' },
ignorePatterns: ['**/node_modules/*'],
overrides: [
{
files: ['e2e/*.spec.js', 'e2e/init.js', 'e2e/utils.js'],
rules: {
'no-undef': 'off'
}
},
{
env: { browser: true, es6: true, node: true },
extends: [
'@react-native-community',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/typescript',
'plugin:import/warnings',
'plugin:prettier/recommended'
],
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { jsx: true },
ecmaVersion: 2018,
project: './tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'react-hooks'],
rules: {
...commonRules,
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-use-before-define': 0, // ["error", { "variables": false }], // enable defining variables after react component;
'@typescript-eslint/semi': ['error'],
'no-void': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
// deprecated: https://palantir.github.io/tslint/rules/no-use-before-declare/
semi: 'off'
}
}
],
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 6,
sourceType: 'module'
},
rules: {
...commonRules,
'no-unused-vars': ['error', { args: 'none' }]
},
settings: {
'import/ignore': 'react-navigation',
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
},
typescript: {
alwaysTryTypes: true // always try to resolve types under `<roo/>@types` directory even it doesn't contain any source code, like `@types/unist`
}
},
react: {
pragma: 'React', // Pragma to use, default to "React"
version: '16.9.0' // React version, default to the latest React stable release
}
}
};
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install NodeJS
uses: actions/setup-node@v1
with:
node-version: '13.x'
node-version: '15.x'
- name: Cache Npm
uses: actions/cache@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install NodeJS
uses: actions/setup-node@v1
with:
node-version: '13.x'
node-version: '15.x'
- name: Cache Npm
uses: actions/cache@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@ fastlane/screenshots
android/.project
android/app/.project
android/app/bin

# rust
rust/signer/target
rust/meta_reading/target
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ android {
defaultConfig {
applicationId "io.parity.signer"
multiDexEnabled true
minSdkVersion 18
minSdkVersion 24
missingDimensionStrategy 'react-native-camera', 'general'
targetSdkVersion 29
versionCode 4602
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new EthkeyBridgePackage());
packages.add(new SubstrateSignPackage());
return packages;
}

Expand Down
Loading