More RC Bugfixes (#1669)
* Fix #1653 * Fix #1648 * Fix #1638 * Fix test
This commit is contained in:
parent
ab4eaf1b05
commit
54102d07b0
|
@ -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}
|
||||
|
|
|
@ -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 = (
|
||||
|
|
|
@ -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 => ({
|
||||
|
|
|
@ -105,6 +105,6 @@ describe('meta reducer', () => {
|
|||
...INITIAL_STATE,
|
||||
unit: 'modified'
|
||||
};
|
||||
expect(meta(modifiedState, resetAction)).toEqual(INITIAL_STATE);
|
||||
expect(meta(modifiedState, resetAction)).toEqual(modifiedState);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue