Skip to content

Commit

Permalink
remove change pubKey type
Browse files Browse the repository at this point in the history
  • Loading branch information
daoauth committed Jan 9, 2024
1 parent d3dcaa2 commit 34d12b4
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/wallet-ts/src/utils/wallets/welldone/WelldoneWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,11 @@ export class WelldoneWallet {
return new TxRestApi(endpoints.rest).fetchTxPoll(txHash)
}

private changePubKeyType(authInfoBytes: Uint8Array) {
const authInfo = CosmosTxV1Beta1Tx.AuthInfo.decode(authInfoBytes)

authInfo.signerInfos.forEach((signerInfo) => {
if (signerInfo.publicKey) {
signerInfo.publicKey.typeUrl = '/injective.crypto.v1beta1.ethsecp256k1.PubKey'
}
})

return CosmosTxV1Beta1Tx.AuthInfo.encode(authInfo).finish()
}

public async signTransaction(
signDoc: Omit<CosmosTxV1Beta1Tx.SignDoc, 'accountNumber'> & {
accountNumber: Long
},
): Promise<DirectSignResponse> {
const authInfoBytes = this.changePubKeyType(signDoc.authInfoBytes)
signDoc.authInfoBytes = authInfoBytes

const welldone = await this.getWelldoneWallet()

try {
Expand Down

0 comments on commit 34d12b4

Please sign in to comment.