add feePayer param for assignment of granter field in AuthInfo

This commit is contained in:
arnabghose997 2022-06-02 15:05:08 +05:30 committed by Simon Warta
parent b712a0ac1c
commit 5a40cdd3bb

View File

@ -34,6 +34,7 @@ export function makeAuthInfoBytes(
signers: ReadonlyArray<{ readonly pubkey: Any; readonly sequence: number }>,
feeAmount: readonly Coin[],
gasLimit: number,
feePayer: string,
signMode = SignMode.SIGN_MODE_DIRECT,
): Uint8Array {
const authInfo = {
@ -41,7 +42,8 @@ export function makeAuthInfoBytes(
fee: {
amount: [...feeAmount],
gasLimit: Long.fromNumber(gasLimit),
},
granter: feePayer
}
};
return AuthInfo.encode(AuthInfo.fromPartial(authInfo)).finish();
}