rainbow
rainbow copied to clipboard
Swaps deeplink
Fixes APP-1234
What changed (plus any additional context for devs)
inputAsset: UniqueId
outputAsset: UniqueId
inputAmount: Number
outputAmount: Number
percentageToSell: Number // value between 0 and 1
gasSpeed: 'normal' | 'fast' | 'urgent'
slippage: Number
flashbots: Boolean
from: Address
with assets
inputAssetandoutputAssetexpects aUniqueId (address_chainId)ex:rainbow://swaps?inputAsset=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_1
with prefilled values
percentageToSell>inputAmount>outputAmountonly one is used, in this order of importancepercentageToSellexpects a value between0and1ex:rainbow://swaps?inputAsset=eth_1&percentageToSell=0.2, 20% of wallet swappable ETH
with gasSpeed
- values are
normal,fastorurgentex:rainbow://swaps?gasSpeed=urgent
with flashbots
- param not included does not mean false, keeps user preferences
flashbots=trueany other value besidestruemeansfalseex:rainbow://swaps?flashbots=true
with slipagge
- in bips
slippage=100= 1% slippage ex:rainbow://swaps?slippage=100
with from
- let you navigate to another wallet, param is silently ignored if you don't own the wallet
ex:
rainbow://swaps?from=0x507F0daA42b215273B8a063B092ff3b6d27767aF
Screen recordings / screenshots
What to test
- multiple weird combinations of params
- with app open and app closed
to test in ios you can run xcrun simctl openurl booted 'rainbow://swap/?outputAsset=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_1&gasSpeed=urgent&flashbots=true&inputAmount=1&inputAsset=eth_1'
hey @greg-schrammel, did we end up getting blocked / deprioritizing this?
hey @greg-schrammel, did we end up getting blocked / deprioritizing this?
no I moved to other stuff and forgot about it, just fixed the conflicts