File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -2872,6 +2872,26 @@ func (r *rpcServer) DeleteAssetRoot(ctx context.Context,
28722872
28732873 rpcsLog .Debugf ("Deleting asset root for %v" , spew .Sdump (universeID ))
28742874
2875+ // If the universe proof type is unspecified, we'll delete both the
2876+ // issuance and transfer roots.
2877+ if universeID .ProofType == universe .ProofTypeUnspecified {
2878+ universeID .ProofType = universe .ProofTypeIssuance
2879+ _ , err := r .cfg .BaseUniverse .DeleteRoot (ctx , universeID )
2880+ if err != nil {
2881+ return nil , err
2882+ }
2883+
2884+ universeID .ProofType = universe .ProofTypeTransfer
2885+ _ , err = r .cfg .BaseUniverse .DeleteRoot (ctx , universeID )
2886+ if err != nil {
2887+ return nil , err
2888+ }
2889+
2890+ return & unirpc.DeleteRootResponse {}, nil
2891+ }
2892+
2893+ // At this point the universe proof type was specified, so we'll only
2894+ // delete the root for that proof type.
28752895 _ , err = r .cfg .BaseUniverse .DeleteRoot (ctx , universeID )
28762896 if err != nil {
28772897 return nil , err
You can’t perform that action at this time.
0 commit comments