Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
fix: return mainnet instead of bitcoin for get_info (#348)
Browse files Browse the repository at this point in the history
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
  • Loading branch information
reneaaron and rolznz authored May 29, 2024
1 parent 6cccb6b commit 6b15b38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion handle_info_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ func (svc *Service) HandleGetInfoEvent(ctx context.Context, nip47Request *Nip47R
return
}

network := info.Network
// Some implementations return "bitcoin" while NIP47 expects "mainnet"
if network == "bitcoin" {
network = "mainnet"
}

responsePayload := &Nip47GetInfoResponse{
Alias: info.Alias,
Color: info.Color,
Pubkey: info.Pubkey,
Network: info.Network,
Network: network,
BlockHeight: info.BlockHeight,
BlockHash: info.BlockHash,
Methods: svc.GetMethods(app),
Expand Down

0 comments on commit 6b15b38

Please sign in to comment.