Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

[Stellar]: Message and check for multisign are both wrong. #1094

Open
Kanaye opened this issue Mar 10, 2021 · 1 comment
Open

[Stellar]: Message and check for multisign are both wrong. #1094

Kanaye opened this issue Mar 10, 2021 · 1 comment

Comments

@Kanaye
Copy link

Kanaye commented Mar 10, 2021

grafik
This message is missleading and disabling the ability to send XLM based on this condition

is just wrong.

In Stellar multisign doesn't mean "You need all signers signature to sign a transaction" but "you need a combined weight of signers to be equal or greater than the transactions treshold". See: https://developers.stellar.org/docs/glossary/multisig/#authorization

What a correct implementation would look like:

  1. determine the type of treshold the transaction would require "low", "medium" or "high" (afaik ledger live currently only uses payment and create account operation, which are "medium". But correct me if I'm wrong).
  2. fetch the determined threshold from the account object. The account object is probably already beeing fetched somewhere in the codebase, but I'm not familiar with it, so can't tell.
  3. determine the weight of the ledger key. This is done by looking up the public key in the account objects "signers".
  4. Compare if determined_threshold <= determinded_signer_weight. If so: proceed as the transaction is valid. If not: show some message telling that the transactions isn't signable with only this key.

If you wish, I might be able to take the time to make a PR for this.

Also please provide feedback about your thoughts about this.

@ghost
Copy link

ghost commented Jul 13, 2021

Hi @Kanaye thanks a lot for your feedback and sorry for the late answer.

We simply don't support Stellar multisign in Ledger Live, hence the basic signers.length > 1 condition.
You are right that the error message is misleading, it should maybe say "...to send Stellar with Ledger Live".

Your proposed implementation seems correct, a PR is always welcome.

Thanks again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant