-
Notifications
You must be signed in to change notification settings - Fork 8
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
0xGasless Plugin #196
base: master
Are you sure you want to change the base?
0xGasless Plugin #196
Conversation
This upgrade gives us more information about the raw value's type when a cleaner fails. Very useful.
src/partners/0xgasless.ts
Outdated
| 'cancelled' | ||
| 'payment_error' | ||
| 'rejected' | ||
const statusMap: { [key in PartnerStatuses]: Status } = { |
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.
unused
src/partners/0xgasless.ts
Outdated
datelog(`Snoozing ${60 * retry}s`) | ||
await snooze(60000 * retry) | ||
} else { | ||
// We can't safely save our progress since we go from newest to oldest. |
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.
technically not true since you use a date range this is earlier and work your way up to present. One small fix that would be needed (and also in the paybis plugin) is to only set latestIsoDate
if you have fully finished
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.
See my untested fixup commit
src/partners/0xgasless.ts
Outdated
|
||
const ssTx: StandardTx = { | ||
status, | ||
orderId: trade.zid, |
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.
This MUST match the orderId used by the 0x exchange plugin. I don't think it does.
src/partners/0xgasless.ts
Outdated
|
||
const { | ||
isoDate: tradeIsoDate, | ||
timestamp: tradeTimestamp |
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.
why rename isoDate
and timestamp
. There's no conflict and it would match the StandardTx type for easy assignment
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
none