Skip to content

Commit

Permalink
add nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
ogtownsend committed Sep 20, 2024
1 parent 2529ff1 commit 34760fd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ type TokenAdminRegistryView struct {
}

func GenerateTokenAdminRegistryView(taContract *token_admin_registry.TokenAdminRegistry) (TokenAdminRegistryView, error) {
if taContract == nil {
return TokenAdminRegistryView{}, fmt.Errorf("token admin registry contract is nil")
}
tokens, err := getAllConfiguredTokensPaginated(taContract)
if err != nil {
return TokenAdminRegistryView{}, fmt.Errorf("view error for token admin registry: %w", err)
Expand Down

0 comments on commit 34760fd

Please sign in to comment.