Skip to content

Commit

Permalink
Fixed Trezor Add-Account Bug (#3946)
Browse files Browse the repository at this point in the history
* resolved styling bug for hardwareui component when text too short

* fixed trezor getMultipleAddresses bug
  • Loading branch information
blurpesec authored Apr 29, 2021
1 parent 10922ed commit ea3aca5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
32 changes: 24 additions & 8 deletions .storybook/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,18 @@ exports[` Storyshots Features/AddAccount/Hardware Ledger Unlock UI 1`] = `
comprehensive troubleshooting guide
</a>
.
<svg
className="Icon__SInlineSVG-tq1i3y-0 eyLbcM Hardware__HardwareImage-sc-1sopyir-0 koDDvq"
id="test-file-stub"
/>
</p>
<svg
className="Icon__SInlineSVG-tq1i3y-0 eyLbcM Hardware__HardwareImage-sc-1sopyir-0 koDDvq"
id="test-file-stub"
/>
<p
className="Text__SText-sc-14ylyin-0 duJURA"
color="#282d32"
fontSize="18px"
fontWeight={null}
letterSpacing="normal"
>
<br />
<button
className="sc-AxjAm sc-AxhUy sc-AxgMl jUWfvp Button__SButton-sc-1fs4nba-2 GguFm Hardware__HardwareConnectBtn-sc-1sopyir-3 bxAHdO"
Expand Down Expand Up @@ -882,10 +890,18 @@ exports[` Storyshots Features/AddAccount/Hardware Trezor Unlock UI 1`] = `
letterSpacing="normal"
>
After you've connected, follow the instructions on screen to access your account.
<svg
className="Icon__SInlineSVG-tq1i3y-0 eyLbcM Hardware__HardwareImage-sc-1sopyir-0 koDDvq"
id="test-file-stub"
/>
</p>
<svg
className="Icon__SInlineSVG-tq1i3y-0 eyLbcM Hardware__HardwareImage-sc-1sopyir-0 koDDvq"
id="test-file-stub"
/>
<p
className="Text__SText-sc-14ylyin-0 duJURA"
color="#282d32"
fontSize="18px"
fontWeight={null}
letterSpacing="normal"
>
<br />
<button
className="sc-AxjAm sc-AxhUy sc-AxgMl jUWfvp Button__SButton-sc-1fs4nba-2 GguFm Hardware__HardwareConnectBtn-sc-1sopyir-3 bxAHdO"
Expand Down
11 changes: 10 additions & 1 deletion src/components/WalletUnlock/Hardware.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ const HardwareWalletUI = ({
textAlign="center"
>
{translate(hardwareConfigs[walletId].unlockTipTransKey, { $network: network.id })}
<HardwareImage type={hardwareConfigs[walletId].iconId} />
</Text>
<HardwareImage type={hardwareConfigs[walletId].iconId} />
<Text
lineHeight="1.5"
letterSpacing="normal"
fontSize={FONT_SIZE.MD}
paddingTop={SPACING.BASE}
color={COLORS.GREY_DARKEST}
textAlign="center"
>
{connectionError && (
<ErrorMessageContainer>
<InlineMessage
Expand Down
2 changes: 1 addition & 1 deletion src/services/WalletService/wallets/Trezor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class Trezor extends HardwareWallet {
}

public async getMultipleAddresses(paths: ExtendedDPath[]): Promise<DWAccountDisplay[]> {
const keyInfo = this.prefetch(paths);
const keyInfo = await this.prefetch(paths);
return flatten(
Object.entries(keyInfo).map(([key, value]) => {
const dpath = paths.find((x) => x.value === key);
Expand Down

0 comments on commit ea3aca5

Please sign in to comment.