Compare commits
1 Commits
main
...
sk-format-
Author | SHA1 | Date | |
---|---|---|---|
|
2edfb4b4cf |
@ -277,7 +277,26 @@ export const SignTxEmbed = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
return JSONbig.stringify(transactionDetails.txBody, null, 2)
|
let txBody = transactionDetails.txBody;
|
||||||
|
|
||||||
|
// If it's a MsgCreateValidator, format pubkey in present in the message
|
||||||
|
if (txBody.value.messages[0].typeUrl === "/cosmos.staking.v1beta1.MsgCreateValidator") {
|
||||||
|
txBody = {
|
||||||
|
...txBody,
|
||||||
|
value: {
|
||||||
|
...txBody.value,
|
||||||
|
messages: txBody.value.messages.map((msg) => ({
|
||||||
|
...msg,
|
||||||
|
value: {
|
||||||
|
...msg.value,
|
||||||
|
pubkey: decodeOptionalPubkey(msg.value.pubkey),
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSONbig.stringify(txBody, null, 2)
|
||||||
},
|
},
|
||||||
[transactionDetails]
|
[transactionDetails]
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user