stellar-expert / albedo

Security-centric, developer-friendly, easy-to-use delegated signer and keystore for Stellar Network
https://albedo.link
MIT License
64 stars 14 forks source link

Assets are not in lexicographic order #67

Closed s-a-y closed 2 years ago

s-a-y commented 2 years ago

Trying to use Albedo to make deposits into liquidity pools, founds few bugs, this is number 1

Choosing Asset A ETH:GBDEVU63Y6NTHJQQZIKVTC23NWLQVP3WJ2RI2OTSJTNYOIGICST6DUXR Asset B USDT:GCQTGZQQ5G4PTM2GL7CDIFKUBIPEC52BROAQIAPW53XBRJVN6ZJVTG6V

Error details:
"Assets are not in lexicographic order" at https://albedo.link/wallet/liquidity-pool/deposit
Error: Assets are not in lexicographic order
    at new e (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:1045325)
    at mt (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:134480)
    at gt (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:134147)
    at ie.get poolId (https://albedo.link/882.js:1:23836)
    at We (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:605899)
    at e.t.computeValue_ (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:604159)
    at e.t.trackAndCompute (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:604003)
    at e.t.get (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:603239)
    at e.t.getObservablePropValue_ (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:631229)
    at ie.get (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:636001)
Components stack: 
    at u (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:582834)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:891849)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:892792)
    at de (https://albedo.link/882.js:1:32071)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:891849)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:892792)
    at div
    at u (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:582834)
    at pe (https://albedo.link/882.js:1:32356)
    at p (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:104248)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:891849)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:892792)
    at We (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:191458)
    at n (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:893324)
    at t (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:890200)
    at div
    at u (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:582834)
    at Je (https://albedo.link/albedo.62186c4a6b59acf85160.js:2:192726)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36

I understand why this happens, but it may not be clear to users which asset should go first, therefore you might want to fix it and automatically sort assets instead of showing this error.

orbitlens commented 2 years ago

Fixed. Thanks a lot for taking time to document all errors! 🤝

s-a-y commented 2 years ago

Thanks a lot for taking time to document all errors!

It's hard to say if it's sarcasm or not, because I didn't spend much time at all with my 1-liner problem descriptions. Hope it's clear enough