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

2022-06-28 Release #2789

Merged
merged 82 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
49216e7
fix: add check for unclaimed rewards in lockup isAccDeletable
esaminu Apr 28, 2022
fb81550
fix: lint issues
esaminu Apr 28, 2022
4e47289
refactor: remove await
esaminu Jun 13, 2022
5e04f71
refactor: add default from_index and limit
esaminu Jun 13, 2022
18144f3
refactor: let to const
esaminu Jun 13, 2022
227d210
refactor: function naming
esaminu Jun 13, 2022
23302de
refactor: minor cleanups
esaminu Jun 13, 2022
c1548cc
feat(analytics): add MixPanel events to top-up options
ggoshanov Jun 17, 2022
3732334
fix: swap okex and binance keys to match values
Jun 20, 2022
3878704
Merge pull request #2760 from near/MYNW-64-mixpanel-events-for-top-up
andy-haynes Jun 21, 2022
daca0fa
feat: fTX Pay Integration
followdarko Jun 21, 2022
126481c
feat: tune url
followdarko Jun 21, 2022
630bf09
feat(ci): Jenkinsfile updates & protection
Jun 21, 2022
00ac7c4
feat(ci): configure MNW accounts
Jun 21, 2022
ca0fded
Merge pull request #2772 from near/jenkins-ci
andy-haynes Jun 21, 2022
8a95117
feat: tune ftx icon
followdarko Jun 22, 2022
8d00af5
Merge pull request #2770 from followdarko/feature/ftxpay
judith-Near Jun 22, 2022
984f209
fix: use correct values in testnet/staging
Jun 22, 2022
8fdde71
Merge pull request #2773 from near/testnet-endpoint-config
andy-haynes Jun 22, 2022
c8ed19a
Merge pull request #2623 from near/WAL-277-withdrawing-lockup-funds-i…
esaminu Jun 23, 2022
7b24611
Revert "Wal 277 withdrawing lockup funds issue"
esaminu Jun 23, 2022
9e16b09
Merge pull request #2774 from near/revert-2623-WAL-277-withdrawing-lo…
esaminu Jun 23, 2022
465ffa8
fix: add check for unclaimed rewards in lockup isAccDeletable
esaminu Apr 28, 2022
919c0dc
fix: lint issues
esaminu Apr 28, 2022
ec6cd6d
refactor: remove await
esaminu Jun 13, 2022
7f4040d
refactor: add default from_index and limit
esaminu Jun 13, 2022
39e12ea
refactor: let to const
esaminu Jun 13, 2022
794c330
refactor: function naming
esaminu Jun 13, 2022
208b233
refactor: minor cleanups
esaminu Jun 13, 2022
38d0ef5
fix: add missing import
esaminu Jun 23, 2022
679483a
fix: typo
esaminu Jun 23, 2022
07d109e
feat: query RPC 'get_price' to estimate fees for token transfer
Patrick1904 Jun 23, 2022
c0cf33c
feat: add batch export to ledger wallet route
esaminu Jun 23, 2022
010dd18
feat: add custom success title
esaminu Jun 23, 2022
4448cc2
fix: return null ledger key if local multisig key
esaminu Jun 23, 2022
39d817d
feat(ci): don't build bundles that won't be deployed
Jun 23, 2022
6d69fe3
feat(ci): deploy mainnet staging when merging master
Jun 23, 2022
a46b56f
feat: pass in state_cleanup contract
esaminu Mar 18, 2022
85d3f32
feat: upgrade near-api-js
esaminu Jun 13, 2022
58c8be2
feat: move cleanup.wasm to buildOutputPath
esaminu Jun 13, 2022
868dcd1
chore: update yarn.lock
esaminu Jun 23, 2022
b17b661
Merge pull request #2532 from near/feat-clean-2fa-state-on-disable
judith-Near Jun 24, 2022
fcc601e
fix: skip await
Patrick1904 Jun 24, 2022
740e176
refactor: localKeyIsNullOrNonMultisigLAK condition
esaminu Jun 24, 2022
baeb98d
Merge pull request #2777 from near/wal-329
Patrick1904 Jun 24, 2022
9580056
feat(ci): only bundle mainnet when it will be deployed
Jun 24, 2022
bddfbf2
feat(ci): don't test other environments when deploying to mainnet
Jun 24, 2022
896fcae
fix: localKey.permission condition
esaminu Jun 27, 2022
3229fea
refactor: addLedgerAccessKey, exportToLedgerWallet
esaminu Jun 27, 2022
14d0ef0
refactor: addLedgerAccessKey, exportToLedgerWallet
esaminu Jun 27, 2022
ae81dfb
Merge pull request #2779 from near/jenkins-staging
andy-haynes Jun 27, 2022
d49ce85
fix: typo
esaminu Jun 27, 2022
a555d9c
Merge pull request #2778 from near/KWLT-24-add-export-accounts-to-led…
esaminu Jun 27, 2022
7670a27
Merge pull request #2775 from near/WAL-277-withdrawing-lockup-funds-i…
esaminu Jun 27, 2022
ef9be31
feat: add disable-2fa script package
esaminu Mar 18, 2022
a3d1db1
fix: remove old near cli 2fa disable script
esaminu Mar 23, 2022
ba708a9
refactor: rename module to utilities
esaminu Mar 28, 2022
c07dbae
refactor: update utilities README
esaminu Mar 28, 2022
47041f1
refactor: format file
esaminu Mar 29, 2022
11d3b4d
chore: update README
esaminu Mar 30, 2022
7118893
fix: move token transfer-related gas to config
Patrick1904 Jun 27, 2022
316e3b6
fix: near-api-js version
esaminu Jun 27, 2022
84c6456
feat: add disable-2fa script package
esaminu Mar 18, 2022
a3d0b52
feat: add restore-account-contract command
esaminu Mar 30, 2022
54ac471
chore: update README.md
esaminu Mar 30, 2022
4d61b08
chore: remove redundant package
esaminu Jun 27, 2022
fc8bb9e
fix: add onCancel functionality
esaminu Jun 27, 2022
7ecc7f5
Merge pull request #2533 from near/WAL-111-test-the-unblock-script-on…
esaminu Jun 27, 2022
a8974d0
Merge pull request #2561 from near/WAL-165-2-fa-recovery-script
esaminu Jun 27, 2022
e8afaf7
Merge pull request #2782 from near/add-ledger-export-oncancel
esaminu Jun 27, 2022
bc045c9
Merge pull request #2781 from near/transfer-gas-config
Patrick1904 Jun 27, 2022
724a5c9
Changed the nearpay link
Jun 28, 2022
d8dd443
Merge pull request #2784 from Kikimora-Labs/update-nearpay-link
PinkiNice Jun 28, 2022
2edbaf1
fix: changed footer community link to discord channel
followdarko Jun 28, 2022
1d4681f
fix: fix wrong config import
Patrick1904 Jun 28, 2022
10ec960
Merge pull request #2787 from near/fix-config-import
Patrick1904 Jun 28, 2022
85178ab
feat(ci): add lint to prebuild step
Jun 28, 2022
9ac28bc
feat: lint on push
Jun 28, 2022
9d048f4
fix: lint after install
andy-haynes Jun 28, 2022
7ef3c82
Merge pull request #2788 from near/eslint-enhancements
andy-haynes Jun 28, 2022
ab66f98
fix: fix footer
followdarko Jun 29, 2022
8166476
Merge pull request #2786 from followdarko/fix/discordlink
Patrick1904 Jun 29, 2022
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Jenkinsfile @morgsmccauley @andy-haynes
58 changes: 30 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pipeline {
AWS_CREDENTIALS = 'aws-credentials-password'
AWS_REGION = 'us-west-2'
TESTNET_AWS_ROLE = credentials('testnet-assumed-role')
TESTNET_AWS_ROLE_ACCOUNT = credentials('testnet-assumed-role-account')
TESTNET_AWS_ACCOUNT_ID = credentials('testnet-mnw-account-id')
MAINNET_AWS_ROLE = credentials('mainnet-assumed-role')
MAINNET_AWS_ROLE_ACCOUNT = credentials('mainnet-assumed-role-account')
MAINNET_AWS_ACCOUNT_ID = credentials('mainnet-mnw-account-id')

// s3 buckets
TESTNET_PR_PREVIEW_STATIC_SITE_BUCKET = credentials('testnet-pr-previews-static-website')
Expand Down Expand Up @@ -47,6 +47,7 @@ pipeline {
steps {
dir("$WORKSPACE/packages/frontend") {
sh 'yarn install --frozen-lockfile'
sh 'yarn lint'
}
}
}
Expand All @@ -62,10 +63,13 @@ pipeline {
stage('packages:test') {
failFast true

when {
expression { env.BUILD_FRONTEND == 'true' }
}
parallel {
stage('frontend:prebuild:testnet-staging') {
when {
expression { env.BUILD_FRONTEND == 'true' }
not { branch 'stable' }
}
environment {
NEAR_WALLET_ENV = 'testnet_STAGING'
Expand All @@ -79,7 +83,7 @@ pipeline {

stage('frontend:prebuild:testnet') {
when {
expression { env.BUILD_FRONTEND == 'true' }
not { branch 'stable' }
}
environment {
NEAR_WALLET_ENV = 'testnet'
Expand All @@ -93,7 +97,7 @@ pipeline {

stage('frontend:prebuild:mainnet-staging') {
when {
expression { env.BUILD_FRONTEND == 'true' }
not { branch 'stable' }
}
environment {
NEAR_WALLET_ENV = 'mainnet_STAGING'
Expand All @@ -106,9 +110,6 @@ pipeline {
}

stage('frontend:prebuild:mainnet') {
when {
expression { env.BUILD_FRONTEND == 'true' }
}
environment {
NEAR_WALLET_ENV = 'mainnet'
}
Expand Down Expand Up @@ -137,8 +138,7 @@ pipeline {
// build end-to-end testing package
stage('e2e-tests') {
when {
expression { env.BUILD_E2E == 'true' };
anyOf { branch 'master' ; branch 'stable' }
expression { env.BUILD_E2E == 'true' }
}
stages {
stage('e2e-tests:build') {
Expand All @@ -155,7 +155,8 @@ pipeline {
// build frontend bundles
stage('frontend:bundle:testnet-staging') {
when {
expression { env.BUILD_FRONTEND == 'true' }
expression { env.BUILD_FRONTEND == 'true' };
not { branch 'stable' }
}
environment {
NEAR_WALLET_ENV = 'testnet_STAGING'
Expand All @@ -170,7 +171,8 @@ pipeline {

stage('frontend:bundle:testnet') {
when {
expression { env.BUILD_FRONTEND == 'true' }
expression { env.BUILD_FRONTEND == 'true' };
branch 'master'
}
environment {
NEAR_WALLET_ENV = 'testnet'
Expand All @@ -185,7 +187,8 @@ pipeline {

stage('frontend:bundle:mainnet-staging') {
when {
expression { env.BUILD_FRONTEND == 'true' }
expression { env.BUILD_FRONTEND == 'true' };
not { branch 'stable' }
}
environment {
NEAR_WALLET_ENV = 'mainnet_STAGING'
Expand All @@ -200,7 +203,8 @@ pipeline {

stage('frontend:bundle:mainnet') {
when {
expression { env.BUILD_FRONTEND == 'true' }
expression { env.BUILD_FRONTEND == 'true' };
branch 'stable'
}
environment {
NEAR_WALLET_ENV = 'mainnet'
Expand Down Expand Up @@ -243,13 +247,13 @@ pipeline {
region: env.AWS_REGION,
credentials: env.AWS_CREDENTIALS,
role: env.TESTNET_AWS_ROLE,
roleAccount: env.TESTNET_AWS_ROLE_ACCOUNT
roleAccount: env.TESTNET_AWS_ACCOUNT_ID
) {
s3Upload(
bucket: "$TESTNET_PR_PREVIEW_STATIC_SITE_BUCKET/$CHANGE_ID",
includePathPattern: "*",
path: '',
workingDir: env.FRONTEND_TESTNET_BUNDLE_PATH
workingDir: env.FRONTEND_TESTNET_STAGING_BUNDLE_PATH
)
}
}
Expand All @@ -265,13 +269,13 @@ pipeline {
region: env.AWS_REGION,
credentials: env.AWS_CREDENTIALS,
role: env.MAINNET_AWS_ROLE,
roleAccount: env.MAINNET_AWS_ROLE_ACCOUNT
roleAccount: env.MAINNET_AWS_ACCOUNT_ID
) {
s3Upload(
bucket: "$MAINNET_PR_PREVIEW_STATIC_SITE_BUCKET/$CHANGE_ID",
includePathPattern: "*",
path: '',
workingDir: env.FRONTEND_MAINNET_BUNDLE_PATH
workingDir: env.FRONTEND_MAINNET_STAGING_BUNDLE_PATH
)
}
}
Expand All @@ -295,7 +299,7 @@ pipeline {
region: env.AWS_REGION,
credentials: env.AWS_CREDENTIALS,
role: env.TESTNET_AWS_ROLE,
roleAccount: env.TESTNET_AWS_ROLE_ACCOUNT
roleAccount: env.TESTNET_AWS_ACCOUNT_ID
) {
s3Upload(
bucket: env.TESTNET_STAGING_STATIC_SITE_BUCKET,
Expand All @@ -313,13 +317,11 @@ pipeline {
}
steps {
milestone(403)
input(message: 'Deploy to testnet?')
milestone(404)
withAWS(
region: env.AWS_REGION,
credentials: env.AWS_CREDENTIALS,
role: env.TESTNET_AWS_ROLE,
roleAccount: env.TESTNET_AWS_ROLE_ACCOUNT
roleAccount: env.TESTNET_AWS_ACCOUNT_ID
) {
s3Upload(
bucket: env.TESTNET_STATIC_SITE_BUCKET,
Expand All @@ -333,15 +335,15 @@ pipeline {

stage('frontend:deploy:mainnet-staging') {
when {
branch 'stable'
branch 'master'
}
steps {
milestone(405)
milestone(404)
withAWS(
region: env.AWS_REGION,
credentials: env.AWS_CREDENTIALS,
role: env.MAINNET_AWS_ROLE,
roleAccount: env.MAINNET_AWS_ROLE_ACCOUNT
roleAccount: env.MAINNET_AWS_ACCOUNT_ID
) {
s3Upload(
bucket: env.MAINNET_STAGING_STATIC_SITE_BUCKET,
Expand All @@ -358,14 +360,14 @@ pipeline {
branch 'stable'
}
steps {
milestone(406)
milestone(405)
input(message: 'Deploy to mainnet?')
milestone(407)
milestone(406)
withAWS(
region: env.AWS_REGION,
credentials: env.AWS_CREDENTIALS,
role: env.MAINNET_AWS_ROLE,
roleAccount: env.MAINNET_AWS_ROLE_ACCOUNT
roleAccount: env.MAINNET_AWS_ACCOUNT_ID
) {
s3Upload(
bucket: env.MAINNET_STATIC_SITE_BUCKET,
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/ci/ParcelBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class ParcelBundler {
this.bundler.on('bundled', (bundle) => {
fs.copyFileSync(this.buildWasmSourcePath('multisig.wasm'), this.buildOutputPath('multisig.wasm'));
fs.copyFileSync(this.buildWasmSourcePath('main.wasm'), this.buildOutputPath('main.wasm'));
fs.copyFileSync(this.buildWasmSourcePath('state_cleanup.wasm'), this.buildOutputPath('state_cleanup.wasm'));
});

return this.bundler;
Expand Down
8 changes: 4 additions & 4 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"lodash.unset": "^4.5.2",
"lodash.update": "^4.10.2",
"mixpanel-browser": "^2.41.0",
"near-api-js": "^0.43.1",
"near-api-js": "^0.45.1",
"near-ledger-js": "^0.2.1",
"near-seed-phrase": "^0.2.0",
"node-cache": "^5.1.2",
Expand Down Expand Up @@ -65,7 +65,7 @@
},
"scripts": {
"predeploy": "yarn build",
"update:static": "cp src/wasm/multisig.wasm dist/multisig.wasm && cp src/wasm/main.wasm dist/main.wasm",
"update:static": "cp src/wasm/multisig.wasm dist/multisig.wasm && cp src/wasm/main.wasm dist/main.wasm && cp src/wasm/state_cleanup.wasm dist/state_cleanup.wasm",
"start": "yarn update:static; parcel src/index.html --https --cert devServerCertificates/primary.crt --key devServerCertificates/private.pem",
"prebuild": "rm -rf dist/",
"build": "yarn run bundle && yarn run sentry",
Expand All @@ -76,8 +76,8 @@
"fix": "eslint --ext .js --ext .jsx . --fix",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"prepush": "yarn run test",
"precommit": "concurrently \"yarn run fix\" \".githooks/format-json\"",
"prepush": "concurrently \"yarn run test\" \"yarn lint\"",
"precommit": ".githooks/format-json",
"preinstall": "npx only-allow yarn"
},
"browserslist": [
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/src/components/Routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import {
import AccessKeysWrapper from './access-keys/v2/AccessKeysWrapper';
import { AutoImportWrapper } from './accounts/auto_import/AutoImportWrapper';
import BatchImportAccounts from './accounts/batch_import_accounts';
import BatchLedgerExport from './accounts/batch_ledger_export';
import { ExistingAccountWrapper } from './accounts/create/existing_account/ExistingAccountWrapper';
import { InitialDepositWrapper } from './accounts/create/initial_deposit/InitialDepositWrapper';
import { CreateAccountLanding } from './accounts/create/landing/CreateAccountLanding';
Expand Down Expand Up @@ -579,6 +580,11 @@ class Routing extends Component {
}, {});
return <BatchImportAccounts accountIdToKeyMap={accountIdToKeyMap} onCancel={() => this.props.history.replace('/')}/>;
})} />
<Route
exact
path="/batch-ledger-export"
component={BatchLedgerExport}
/>
<Route
exact
path="/sign-in-ledger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const CustomContainer = styled.div`
}
`;

const BatchImportAccountsSuccessScreen = ({ accounts = [] }) => {
const BatchImportAccountsSuccessScreen = ({ accounts = [], customTitleId }) => {
const dispatch = useDispatch();
const accountUrlReferrer = useSelector(selectAccountUrlReferrer);

Expand All @@ -36,7 +36,7 @@ const BatchImportAccountsSuccessScreen = ({ accounts = [] }) => {
<AvatarSuccessIcon />
<div className='screen-descripton'>
<h3>
<Translate id="batchImportAccounts.successScreen.title" data={{ noOfAccounts: accounts.length }}/>
<Translate id={customTitleId || 'batchImportAccounts.successScreen.title'} data={{ noOfAccounts: accounts.length }}/>
{accountUrlReferrer || <Translate id="sign.unknownApp" />}
</h3>
<br />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { differenceBy } from 'lodash';
import { differenceBy, uniqWith, isEqual } from 'lodash';

import { IMPORT_STATUS } from '.';

/**
* @typedef {{
* accountId: string,
* status: "pending" | "success" | "waiting" | "error" | null ,
* key: string,
* ledgerHdPath: string
* key?: string,
* ledgerHdPath?: string,
* keyType?: string
* }} account
*
* @typedef {{accounts: account[], urlConfirmed: boolean}} state
Expand Down Expand Up @@ -46,6 +47,13 @@ const sequentialAccountImportReducer = (state = initialState, action) => {

return;
}
case ACTIONS.ADD_ACCOUNTS: {
if (state.accounts.every(({ status }) => status === null)) {
state.accounts = uniqWith(state.accounts.concat(action.accounts), isEqual);
}

return;
}
case ACTIONS.BEGIN_IMPORT: {
if (state.accounts.every(({ status }) => status === null)) {
const [firstAccount, ...remainingAccounts] = state.accounts;
Expand Down
Loading