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" adding liquidity to tokens with Alphanumeric 12 and 4 (mixed) #73

Closed antb123 closed 2 years ago

antb123 commented 2 years ago

Albedo seems to have issues on adding liquidity to tokens with Alphanumeric 12 when the name comes before other asset which is Alpha4.

Here is the LP: curl https://horizon.stellar.org/liquidity_pools/13c2bc477497011061ff3c66f02c9fd66da5a892afa6acf8d65066f796f8aca5

The example is XCHF BTCLN. X is after B but BTCLN is Alphanumeric 12.

I think what is happening is native goes before Alphanumeric 4 which goes before alphanumeric 12.

"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.08119d92f546391a2361.js:2:1048924)
    at wt (https://albedo.link/albedo.08119d92f546391a2361.js:2:135223)
    at bt (https://albedo.link/albedo.08119d92f546391a2361.js:2:134887)
    at ie.get poolId (https://albedo.link/wallet.1f231791d6b1263d91e0abf3bb31f5e6.js:1:24244)
    at We (https://albedo.link/albedo.08119d92f546391a2361.js:2:607268)
    at e.t.computeValue_ (https://albedo.link/albedo.08119d92f546391a2361.js:2:605528)
    at e.t.trackAndCompute (https://albedo.link/albedo.08119d92f546391a2361.js:2:605372)
    at e.t.get (https://albedo.link/albedo.08119d92f546391a2361.js:2:604608)
    at e.t.getObservablePropValue_ (https://albedo.link/albedo.08119d92f546391a2361.js:2:632597)
    at ie.get (https://albedo.link/albedo.08119d92f546391a2361.js:2:637369)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
antb123 commented 2 years ago

referencing: https://github.com/stellar-expert/albedo/issues/67

orbitlens commented 2 years ago

Fixed ✅ Sorry for the delay