Skip to content

Conversation

buck54321
Copy link
Member

The wallets page is restyled. The new style is responsive.

Desktop

Tablet

Mobile

@chappjc chappjc added this to the 0.6/1.0 milestone Jul 14, 2022
@buck54321 buck54321 force-pushed the wallets branch 3 times, most recently from df6fb0d to 752dfc1 Compare July 28, 2022 00:51
@buck54321 buck54321 force-pushed the wallets branch 5 times, most recently from d3bb6e7 to 6ec03b5 Compare August 4, 2022 22:31
@buck54321 buck54321 force-pushed the wallets branch 2 times, most recently from e8eb16b to e6aa794 Compare August 9, 2022 20:06
@buck54321 buck54321 marked this pull request as ready for review August 9, 2022 20:17
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great just based on code. Will actually test next.

I see what you mean about the localized_html bloat. Agree we should look into those done on-the-fly after we get the initial go:embed stuff in.

Comment on lines +616 to +617
console.log(note)
console.log(error.stack)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftovers or you want this because it shouldn't happen?

const page = this.page
Doc.hide(page.sendErr)
const assetID = parseInt(page.sendForm.dataset.assetID || '')
const subtract = page.subtractCheckBox.checked || false
const assetID = parseInt(page.sendForm.dataset.assetID ?? '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eeeek have we broadly misusing || when we should have been using the nullish coalescing operator?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh. I just discovered this, really. Will try to use it more in the future, but it's already bitten me. I did something like

const v = parseFloat(inputElement.value ?? '0')

which yields NaN, because value is not undefined or null, just empty, which is falsy but not nullish.

I think we should use it, but I'm not going to enforce it too strictly.


I've also been using the optional chaining operator, ?..

const thing = { a: 1 }
let v = thing.b.c    // error thrown cuz b undefined
v = thing?.b?.c      // undefined

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests well overall, just a few minor things.

And the following is not an issue with this PR, but there's inconsistent terminology with the built-in wallets. We call them "Native" for DCR and BTC, but "Internal" for ETH:

image

image

This is just something we don't want the user scratching their head over.

Also in that BTC screen, it's a whole number so there are no decimals, not even a single ".0". I guess that's fine if intended, but looks a little unusual for wallet displays.

@chappjc
Copy link
Member

chappjc commented Aug 13, 2022

Thanks for the review followup. Just want to make sure you saw that I had a prior review: #1700 (review) No rush but I got the sense you just were only addressing the second review from my testing. The order filled percent is the main outstanding thing.

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I thought we could just capitalize the other languages where it looks safe, but whatever

@chappjc chappjc merged commit d85cdad into decred:master Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants