-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paul/mtpelerin fixes #5150
Paul/mtpelerin fixes #5150
Conversation
aaef199
to
543d528
Compare
CHANGELOG.md
Outdated
@@ -3,9 +3,11 @@ | |||
## Unreleased | |||
|
|||
- added: 0x Gasless Swap exchange plugin | |||
- added: Add Mt Pelerin support for buy and sell with reverse quotes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be clearer to be explicit instead of "reverse quote" - implying knowledge or agreement on what a "regular quote" is.
Suggest saying something along the lines of "fixed 'from' quote" or "fixed 'to' quote"
Would be helpful to adopt this kind of documentation/naming in code as well so it's easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this is not well documented, but we and several exchange partners very frequently use the term "reverse" quote to refer to 'to' quotes. Almost every exchange partner offers 'from' quotes. It is seemingly the default and hence why it is considered the "regular" quote.
@@ -267,18 +271,32 @@ type WidgetParams = (WidgetBuyParams | WidgetSellParams) & { | |||
type: 'webview' // Integration type ('web'|'popup'|'webview') | |||
} | |||
|
|||
interface WidgetBuyParams { | |||
interface WidgetBuySourceParams { | |||
bsa: string // Default buy tab source amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interfaces need readability improvement.
bsa
-> buySourceAmount
... I think?
Human interpretation would be more efficient if more information could be gleaned from
call sites instead of having to look into definitions and implementations.
Also change comment format to /** comments */
so the hovers work if the
interface is still not clear to the reader.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will use the /** */ style quotes. Good catch. But I can't change the bsa
type of params. Those are the API to MtPelerin so it's out of our control.
|
||
if (hexGasLimit != null && hexGasPrice != null) { | ||
gasLimit = hexToDecimal(hexGasLimit) | ||
gasPrice = div(hexToDecimal(hexGasPrice), '1000000000') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make 1000000000
constant
a30b037
to
14278f4
Compare
hash: string // Hash of signature | ||
net: string // Default network | ||
type: 'webview' // Integration type ('web'|'popup'|'webview') | ||
lang?: string /** 2 characters language code ('fr'|'en') */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments need to be above the keys to show in hovers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack. waste of space.
/rebase |
14278f4
to
2f449a4
Compare
2f449a4
to
5127b1d
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: