Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Emurgo/yoroi-frontend in…
Browse files Browse the repository at this point in the history
…to Ahmed/date-range
  • Loading branch information
neuodev committed Dec 19, 2022
2 parents b3b85d9 + 2f76eb0 commit 6aca080
Show file tree
Hide file tree
Showing 178 changed files with 5,813 additions and 1,127 deletions.
8 changes: 3 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ updates:
directory: "/packages/yoroi-extension"
schedule:
interval: weekly
day: monday
time: 03:00
day: friday
time: "03:00"
timezone: UTC
open-pull-requests-limit: 10
open-pull-requests-limit: 5
allow:
- dependency-name: "@cardano-foundation/ledgerjs-hw-app-cardano"
- dependency-name: "@emurgo/*"
- dependency-name: "cardano-*"
- dependency-name: "ergo-*"
- dependency-name: "lodash"
- dependency-name: "mobx*"
- dependency-name: "react*"
- dependency-name: "trezor-connect"
- dependency-name: "chromedriver"
assignees:
- "vsubhuman"
- "javimaravillas"
rebase-strategy: disabled
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ jobs:
# https://github.com/actions/cache/blob/main/examples.md#node---npm
# It is recommended to cache the NPM cache (~/.npm) instead of node_modules.
# But we put node version into the cache key and cache node_modules.
path: packages/yoroi-ergo-connector/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-ergo-connector/package-lock.json') }}
path: packages/yoroi-connector/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-connector/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
Expand Down Expand Up @@ -210,8 +210,8 @@ jobs:
# https://github.com/actions/cache/blob/main/examples.md#node---npm
# It is recommended to cache the NPM cache (~/.npm) instead of node_modules.
# But we put node version into the cache key and cache node_modules.
path: packages/yoroi-ergo-connector/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-ergo-connector/package-lock.json') }}
path: packages/yoroi-connector/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-connector/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
Expand Down Expand Up @@ -301,8 +301,8 @@ jobs:
# https://github.com/actions/cache/blob/main/examples.md#node---npm
# It is recommended to cache the NPM cache (~/.npm) instead of node_modules.
# But we put node version into the cache key and cache node_modules.
path: packages/yoroi-ergo-connector/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-ergo-connector/package-lock.json') }}
path: packages/yoroi-connector/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-node-${{ steps.nvm.outputs.NVMRC }}-${{ hashFiles('packages/yoroi-connector/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
Expand Down
6 changes: 3 additions & 3 deletions install-all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
npm i \
&& npm i --prefix packages/yoroi-extension \
&& npm i --prefix packages/yoroi-ergo-connector \
&& npm i --prefix packages/yoroi-ergo-connector/example-ergo \
&& npm i --prefix packages/yoroi-ergo-connector/example-cardano
&& npm i --prefix packages/yoroi-connector \
&& npm i --prefix packages/yoroi-connector/example-ergo \
&& npm i --prefix packages/yoroi-connector/example-cardano
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"flow": "lerna run flow --stream",
"test": "lerna run test --stream",
"translations:purge": "lerna run translations:purge -- stream",
"dev:all": "concurrently \"npm run dev:stable --prefix packages/yoroi-extension\" \"npm run cardano --prefix packages/yoroi-ergo-connector\" \"npm run ergo --prefix packages/yoroi-ergo-connector\" "
"dev:all": "concurrently \"npm run dev:stable --prefix packages/yoroi-extension\" \"npm run cardano --prefix packages/yoroi-connector\" \"npm run ergo --prefix packages/yoroi-connector\" "
},
"husky": {
"hooks": {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

This project is used only as an example application.

All related to the dApp is moved to the folder `packages/yoroi-extension/app/ergo-connector`.
All related to the dApp is moved to the folder `packages/yoroi-extension/app/connector`.

### Testing

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "yoroi-ergo-connector",
"name": "yoroi-connector",
"version": "0.8.0",
"description": "",
"scripts": {
Expand All @@ -8,8 +8,8 @@
"cardano": "npm start --prefix example-cardano",
"prod:compress": "node ../../scripts/compress",
"prod:custom": "node ./build.js",
"prod:nightly": "npm run prod:custom -- --yoroiExtensionId=poonlenmfdfbjfeeballhiibknlknepo && npm run prod:compress -- --env 'nightly' --app-id 'yoroi-ergo-connector-nightly' --zip-only --codebase 'https://yoroiwallet.com/dw/yoroi-ergo-connector-nightly.crx' --key ./keys/nightly-key.pem",
"prod:stable": "npm run prod:custom -- --yoroiExtensionId=ffnbelfdoeiohenkjibnmadjiehjhajb && npm run prod:compress -- --env '' --app-id 'yoroi-ergo-connector' --zip-only --codebase 'https://yoroiwallet.com/dw/yoroi-ergo-connector.crx' --key ./keys/production-key.pem"
"prod:nightly": "npm run prod:custom -- --yoroiExtensionId=poonlenmfdfbjfeeballhiibknlknepo && npm run prod:compress -- --env 'nightly' --app-id 'yoroi-connector-nightly' --zip-only --codebase 'https://yoroiwallet.com/dw/yoroi-ergo-connector-nightly.crx' --key ./keys/nightly-key.pem",
"prod:stable": "npm run prod:custom -- --yoroiExtensionId=ffnbelfdoeiohenkjibnmadjiehjhajb && npm run prod:compress -- --env '' --app-id 'yoroi-connector' --zip-only --codebase 'https://yoroiwallet.com/dw/yoroi-ergo-connector.crx' --key ./keys/production-key.pem"
},
"devDependencies": {
"crx": "5.0.1",
Expand Down
File renamed without changes.
126 changes: 0 additions & 126 deletions packages/yoroi-ergo-connector/src/background.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/yoroi-extension/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.*/.circleci/.*
<PROJECT_ROOT>/dev/.*
<PROJECT_ROOT>/build/.*
<PROJECT_ROOT>/node_modules/@emurgo/yoroi-lib/node_modules/resolve/test/resolver/malformed_package_json/package.json

[include]
../node_modules/eslint-plugin-jsx-a11y
Expand Down
4 changes: 2 additions & 2 deletions packages/yoroi-extension/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module.exports = {
stories: [
'../app/components/**/*.stories.js',
'../app/containers/**/*.stories.js',
'../app/ergo-connector/components/**/*.stories.js',
'../app/ergo-connector/containers/**/*.stories.js',
'../app/connector/components/**/*.stories.js',
'../app/connector/containers/**/*.stories.js',
],
addons: [
'@storybook/addon-knobs/register',
Expand Down
2 changes: 1 addition & 1 deletion packages/yoroi-extension/app/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import jormungandrActionsMap from './jormungandr/index';
import type { AdaActionsMap } from './ada/index';
import type { ErgoActionsMap } from './ergo/index';
import type { JormungandrActionsMap } from './jormungandr/index';
import ConnectorActionsMap from '../ergo-connector/actions/connector-actions';
import ConnectorActionsMap from '../connector/actions/connector-actions';
import ServerConnectionActions from './server-connection-actions';

export type ActionsMap = {|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class WalletBackupActions {
password: string,
|}> = new Action();
continueToPrivacyWarning: Action<void> = new Action();
acceptPrivacyNoticeForWalletBackup: Action<void> = new Action();
togglePrivacyNoticeForWalletBackup: Action<void> = new Action();
continueToRecoveryPhraseForWalletBackup: Action<void> = new Action();
addWordToWalletBackupVerification: Action<{| word: string, index: number |}> = new Action();
clearEnteredRecoveryPhrase: Action<void> = new Action();
Expand Down
8 changes: 7 additions & 1 deletion packages/yoroi-extension/app/api/ada/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
getPendingTransactions,
removeAllTransactions,
updateTransactions,
updateUtxos,
} from './lib/storage/bridge/updateTransactions';
import {
addrContainsAccountKey,
Expand Down Expand Up @@ -163,7 +164,7 @@ import { getAllSchemaTables, mapToTables, raii, } from './lib/storage/database/u
import { GetDerivationSpecific, } from './lib/storage/database/walletTypes/common/api/read';
import { bytesToHex, hexToBytes, hexToUtf } from '../../coreUtils';
import type { PersistedSubmittedTransaction } from '../localStorage';
import type { ForeignUtxoFetcher } from '../../ergo-connector/stores/ConnectorStore';
import type { ForeignUtxoFetcher } from '../../connector/stores/ConnectorStore';

// ADA specific Request / Response params

Expand Down Expand Up @@ -674,6 +675,11 @@ export default class AdaApi {
const { skip = 0, limit } = request;
try {
if (!request.isLocalRequest) {
await updateUtxos(
request.publicDeriver.getDb(),
request.publicDeriver,
request.checkAddressesInUse,
);
await updateTransactions(
request.publicDeriver.getDb(),
request.publicDeriver,
Expand Down
Loading

0 comments on commit 6aca080

Please sign in to comment.