Skip to content

Commit

Permalink
fix: visual lag when decrypting wallet, closes #442
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jan 6, 2021
1 parent d07e3f9 commit 9a92c82
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/stacks-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ jobs:
env:
STX_NETWORK: testnet

- name: Install `concat-map` only for Windows
run: yarn add concat-map --ignore-scripts --frozen-lockfile
if: matrix.os == 'windows-latest'
env:
STX_NETWORK: testnet

- name: Build releases
run: ./node_modules/.bin/cross-env yarn package-${{ matrix.NPM_COMMAND }}
env:
Expand Down
3 changes: 3 additions & 0 deletions app/modals/stacking/stacking-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
import { DecryptWalletForm } from './steps/decrypt-wallet-form';
import { SignTxWithLedger } from './steps/sign-tx-with-ledger';
import { StackingFailed } from './steps/stacking-failed';
import { delay } from '@utils/delay';

enum StackingModalStep {
DecryptWalletAndSend,
Expand Down Expand Up @@ -206,6 +207,8 @@ export const StackingModal: FC<StackingModalProps> = props => {
};

setHasSubmitted(true);
await delay(100);

if (walletType === 'software') {
setIsDecrypting(true);

Expand Down
2 changes: 1 addition & 1 deletion app/pages/home/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const Home: FC = () => {
<StackingBeginsSoonCard blocksTillNextCycle={nextCycleInfo?.blocksToNextCycle} />
),
[HomeCardState.StackingActive]: <StackingCard />,
[HomeCardState.StackingError]: <StackingError error="sldkjfslfd" />,
[HomeCardState.StackingError]: <StackingError />,
[HomeCardState.PostStacking]: <></>,
};

Expand Down
3 changes: 1 addition & 2 deletions app/store/home/home.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ const selectMeetsMinStackingThreshold = createSelector(
);

const selectShowErrorCard = createSelector(selectStackingError, state => {
const errorToCheck = [state.blockTimeInfo, state.coreNodeInfo, state.poxInfo];
return errorToCheck.some(val => val === true);
return Object.values(state).some(val => val === true);
});

export const selectHomeCardState = createSelector(
Expand Down
5 changes: 1 addition & 4 deletions app/store/stacking/stacking.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,18 @@ export const stackingSlice = createSlice({
) => {
state.initialRequestsComplete.stackerInfo = true;
if ('error' in action.payload || !action.payload.stacked) {
state.errors.stackerInfo = true;
return;
}
state.stackerInfo = action.payload.details;
state.errors.stackerInfo = false;
},
[fetchStackerInfo.rejected.toString()]: state => {
state.initialRequestsComplete.stackerInfo = true;
state.errors.stackerInfo = true;
},
[activeStackingTx.toString()]: (state, action: PayloadAction<{ txId: string }>) => {
state.contractCallTx = action.payload.txId;
},
// [activeStackingTx]: (state, action: PayloadAction<{ txId: string }>) => {
// state.contractCallTx = action.payload.txId;
// },
[removeStackingTx.toString()]: state => {
state.contractCallTx = null;
},
Expand Down

0 comments on commit 9a92c82

Please sign in to comment.