Skip to content

Commit

Permalink
Merge branch 'injective-ledger-leap' into release-v2.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tombeynon committed Jan 18, 2025
2 parents 407a39b + db66f97 commit b0b47b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/adapters/InjectiveSigningAdapter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ export default class InjectiveSigningAdapter extends DefaultSigningAdapter {
return txRawEip712
}

toProto(message){
if(!this.signerProvider.isLedger()){
return super.toProto(message)
}

const injMessage = message.toInjective()
return {
typeUrl: injMessage.toDirectSign().type,
value: injMessage.toBinary()
}
}

pubkeyTypeUrl(pub_key){
if(pub_key && pub_key['@type']) return pub_key['@type']

Expand Down
4 changes: 4 additions & 0 deletions src/utils/LeapSignerProvider.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default class LeapSignerProvider extends SignerProvider {
}
}

signEIP712(...args){
return this.provider.experimentalSignEIP712CosmosTx_v0(...args)
}

available() {
return !!this.provider || isMobile()
}
Expand Down

0 comments on commit b0b47b0

Please sign in to comment.