Conversation
ac127af to
feeefd4
Compare
Klakurka
left a comment
There was a problem hiding this comment.
We're likely going to have a lot of fiat currencies supported down the line so IMO we should just show the one they have set in their account config.
We can potentially make a task to allow them to grab a different currency if they want (or even multiple) but for now let's just use their set currency as that's what they'd be expecting.
| "txId": <txId>, | ||
| "... | ||
| }`} | ||
| "myButtonName": <buttonName>, |
| rawMessage: string | ||
| inputAddresses: string[] | ||
| prices: Array<{ | ||
| price: { |
There was a problem hiding this comment.
No need for all that. This is supposed to be simplified, so only take what is necessary, and for what I've gathered, it would be: value and quoteId.
There was a problem hiding this comment.
Then alter getSimplifiedTransaction to take out these fields.
utils/validators.ts
Outdated
| .replace('<opReturn>', opReturn) | ||
| .replace('<signature>', `${JSON.stringify(signature, undefined, 2)}`) | ||
| .replace('<inputAddresses>', `${JSON.stringify(postDataParameters.inputAddresses, undefined, 2)}`) | ||
| .replace('<value>', `${JSON.stringify(postDataParameters.value)}`) |
There was a problem hiding this comment.
Why are you JSON.stringifing a string? Just do as it's done with the other strings, e.g.
`"${postDataParameters.address}"`
chedieck
left a comment
There was a problem hiding this comment.
I think this works well for a MVP.
Some future ideas could be including the currency name in the response & limiting the decimal cases to 2 digits.

Related to #977
Description
Added "value" variable to trigger variables.
Value will be an object with usd and cad attributes indicating the price in each fiat currency.
Test plan
Create a trigger and try to usa value variable.