mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-19 22:38:12 +00:00
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 (
|
return (
|
||||||
<div className="OnboardModal">
|
<div className="OnboardModal">
|
||||||
<Modal
|
<Modal isOpen={isOpen} buttons={buttons} maxWidth={800} handleClose={this.closeModal}>
|
||||||
isOpen={isOpen}
|
|
||||||
buttons={buttons}
|
|
||||||
maxWidth={800}
|
|
||||||
handleClose={() => (slideNumber === NUMBER_OF_SLIDES ? this.closeModal : null)}
|
|
||||||
>
|
|
||||||
<div className="OnboardModal-stepper">
|
<div className="OnboardModal-stepper">
|
||||||
<Stepper
|
<Stepper
|
||||||
steps={steps}
|
steps={steps}
|
||||||
|
@ -47,14 +47,14 @@ export class LedgerWallet extends DeterministicWallet implements IFullWallet {
|
|||||||
// modeled after
|
// modeled after
|
||||||
// https://github.com/kvhnuke/etherwallet/blob/3f7ff809e5d02d7ea47db559adaca1c930025e24/app/scripts/controllers/signMsgCtrl.js#L53
|
// https://github.com/kvhnuke/etherwallet/blob/3f7ff809e5d02d7ea47db559adaca1c930025e24/app/scripts/controllers/signMsgCtrl.js#L53
|
||||||
public async signMessage(msg: string): Promise<string> {
|
public async signMessage(msg: string): Promise<string> {
|
||||||
const msgHex = Buffer.from(msg).toString('hex');
|
if (!msg) {
|
||||||
try {
|
throw Error('No message to sign');
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
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 = (
|
public displayAddress = (
|
||||||
|
@ -60,7 +60,8 @@ const tokenToToken = (
|
|||||||
|
|
||||||
const reset = (state: State): State => ({
|
const reset = (state: State): State => ({
|
||||||
...INITIAL_STATE,
|
...INITIAL_STATE,
|
||||||
isContractInteraction: state.isContractInteraction
|
isContractInteraction: state.isContractInteraction,
|
||||||
|
unit: state.unit
|
||||||
});
|
});
|
||||||
|
|
||||||
const unitMeta = (state: State, { payload }: SetUnitMetaAction): State => ({
|
const unitMeta = (state: State, { payload }: SetUnitMetaAction): State => ({
|
||||||
|
@ -105,6 +105,6 @@ describe('meta reducer', () => {
|
|||||||
...INITIAL_STATE,
|
...INITIAL_STATE,
|
||||||
unit: 'modified'
|
unit: 'modified'
|
||||||
};
|
};
|
||||||
expect(meta(modifiedState, resetAction)).toEqual(INITIAL_STATE);
|
expect(meta(modifiedState, resetAction)).toEqual(modifiedState);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user