-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tendermint): support unsigned txs for ledger's keplr extension #2148
Conversation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
89ee914
to
4263525
Compare
4263525
to
4af3927
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work! Only one comment from my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -234,6 +236,7 @@ impl PlatformCoinWithTokensActivationOps for TendermintCoin { | |||
protocol_conf: Self::PlatformProtocolInfo, | |||
) -> Result<Self, MmError<Self::ActivationError>> { | |||
let conf = TendermintConf::try_from_json(&ticker, coin_conf)?; | |||
let is_keplr_from_ledger = activation_request.is_keplr_from_ledger && activation_request.with_pubkey.is_some(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Can this be a keplr from ledger
but not with pubkey
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it can't. If you are using hardware wallet, with-pubkey
is the only way you can use your wallet with mm2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, then does it make sense to && activation_request.with_pubkey.is_some()
. If we suspect the activation request might be malformed, maybe we could error here instead.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
* dev: fix(restrictions): remove wallet-only restriction from max_maker_vol (#2153) feat(tendermint): support unsigned txs for ledger's keplr extension (#2148) chore(toolchain): upgrade to 1.72 nightly (#2149) feat(solana-swap): solana swap protocol v1 POC (#2091) fix(docs): update cargo test command (#2144)
Currently, pubkey-only mode fails with Ledger's Keplr extension. This is because Ledger doesn't support
SIGN_MODE_DIRECT
transaction signing (more context).Ledger supports two signing modes at the moment:
The first one is a legacy signing type and doesn't support HTLC transactions, meaning we can't support swaps with it.
Unlike the first one, the second one is actively maintained but Keplr doesn't support it yet.
So we end up with having one option only; use
SIGN_MODE_LEGACY_AMINO_JSON
and only support withdrawals for Ledger's Keplr extension.