add feePayer param for assignment of granter field in AuthInfo

This commit is contained in:
arnabghose997
2022-09-07 15:31:07 +02:00
committed by Simon Warta
parent b712a0ac1c
commit 5a40cdd3bb
+3 -1
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();
}