mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-06-03 20:56:38 +00:00
improved error handling
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
5adaab3b14
commit
6e3d5ec394
@ -34,8 +34,10 @@ func ReissueAsset(reissue_tx string) (txid string, err error) {
|
||||
err = errors.New("reissuance of RDDL failed")
|
||||
} else {
|
||||
var txobj ReissueResult
|
||||
json.Unmarshal(stdout.Bytes(), &txobj)
|
||||
txid = txobj.Txid
|
||||
err = json.Unmarshal(stdout.Bytes(), &txobj)
|
||||
if err == nil {
|
||||
txid = txobj.Txid
|
||||
}
|
||||
}
|
||||
return txid, err
|
||||
}
|
||||
|
@ -18,7 +18,8 @@ func (k msgServer) ReissueRDDLProposal(goCtx context.Context, msg *types.MsgReis
|
||||
txID, err := util.ReissueAsset(msg.Tx)
|
||||
if err == nil {
|
||||
// 3. notarize result by notarizing the liquid tx-id
|
||||
util.SendRDDLReissuanceResult(ctx, msg.GetProposer(), txID, msg.GetBlockheight())
|
||||
_ = util.SendRDDLReissuanceResult(ctx, msg.GetProposer(), txID, msg.GetBlockheight())
|
||||
//TODO verify and resolve error
|
||||
}
|
||||
//TODO: reissuance need to be initiated otherwise
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user