File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ type BroadcastResult = { code: number; transactionHash: string; rawLog?: string
2727
2828// Build MsgShareSubscription manually — the SDK version has a camelCase/snake_case mismatch
2929// between buildMsgShareSubscription (outputs acc_address) and encodeMsgShareSubscription
30- // (reads accAddress), plus field 4 wire type bug (varint vs string for cosmossdk.io/math.Int).
30+ // (reads accAddress). Field 4 (bytes) is cosmossdk.io/math.Int and must serialize as a
31+ // length-prefixed string on the wire; passing a JS number causes the encoder to emit
32+ // varint and the chain rejects with a wire-type mismatch.
3133function buildMsgShareSubscription ( opts : {
3234 from : string ; id : number ; accAddress : string ; bytes : number ;
3335} ) : EncodedMsg {
@@ -38,7 +40,7 @@ function buildMsgShareSubscription(opts: {
3840 id : opts . id ,
3941 accAddress : opts . accAddress ,
4042 acc_address : opts . accAddress ,
41- bytes : opts . bytes ,
43+ bytes : String ( opts . bytes ) ,
4244 } ,
4345 } ;
4446}
You can’t perform that action at this time.
0 commit comments