File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2092,8 +2092,18 @@ func (r *rpcServer) BurnAsset(ctx context.Context,
20922092
20932093 var groupKey * btcec.PublicKey
20942094 assetGroup , err := r .cfg .TapAddrBook .QueryAssetGroup (ctx , assetID )
2095- if err == nil && assetGroup .GroupKey != nil {
2095+ switch {
2096+ case err == nil && assetGroup .GroupKey != nil :
2097+ // We found the asset group, so we can use the group key to
2098+ // burn the asset.
20962099 groupKey = & assetGroup .GroupPubKey
2100+ case errors .Is (err , address .ErrAssetGroupUnknown ):
2101+ // We don't know the asset group, so we'll try to burn the
2102+ // asset using the asset ID only.
2103+ rpcsLog .Debug ("Asset group key not found, asset may not be " +
2104+ "part of a group" )
2105+ case err != nil :
2106+ return nil , fmt .Errorf ("error querying asset group: %w" , err )
20972107 }
20982108
20992109 fundResp , err := r .cfg .AssetWallet .FundBurn (
You can’t perform that action at this time.
0 commit comments