More RC Bugfixes (#1669)

* Fix #1653

* Fix #1648

* Fix #1638

* Fix test
This commit is contained in:
HenryNguyen5 2018-04-24 23:26:53 -04:00 committed by Daniel Ternyak
parent ab4eaf1b05
commit 54102d07b0
4 changed files with 11 additions and 15 deletions

View File

@ -120,12 +120,7 @@ class OnboardModal extends React.Component<Props, State> {
return (
<div className="OnboardModal">
<Modal
isOpen={isOpen}
buttons={buttons}
maxWidth={800}
handleClose={() => (slideNumber === NUMBER_OF_SLIDES ? this.closeModal : null)}
>
<Modal isOpen={isOpen} buttons={buttons} maxWidth={800} handleClose={this.closeModal}>
<div className="OnboardModal-stepper">
<Stepper
steps={steps}

View File

@ -47,14 +47,14 @@ export class LedgerWallet extends DeterministicWallet implements IFullWallet {
// modeled after
// https://github.com/kvhnuke/etherwallet/blob/3f7ff809e5d02d7ea47db559adaca1c930025e24/app/scripts/controllers/signMsgCtrl.js#L53
public async signMessage(msg: string): Promise<string> {
const msgHex = Buffer.from(msg).toString('hex');
try {
const signed = await this.ethApp.signPersonalMessage_async(this.getPath(), msgHex);
const combined = addHexPrefix(signed.r + signed.s + signed.v.toString(16));
return combined;
} catch (error) {
throw (this.ethApp as any).getError(error);
if (!msg) {
throw Error('No message to sign');
}
const msgHex = Buffer.from(msg).toString('hex');
const signed = await this.ethApp.signPersonalMessage_async(this.getPath(), msgHex);
const combined = addHexPrefix(signed.r + signed.s + signed.v.toString(16));
return combined;
}
public displayAddress = (

View File

@ -60,7 +60,8 @@ const tokenToToken = (
const reset = (state: State): State => ({
...INITIAL_STATE,
isContractInteraction: state.isContractInteraction
isContractInteraction: state.isContractInteraction,
unit: state.unit
});
const unitMeta = (state: State, { payload }: SetUnitMetaAction): State => ({

View File

@ -105,6 +105,6 @@ describe('meta reducer', () => {
...INITIAL_STATE,
unit: 'modified'
};
expect(meta(modifiedState, resetAction)).toEqual(INITIAL_STATE);
expect(meta(modifiedState, resetAction)).toEqual(modifiedState);
});
});