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

Commit

Permalink
Added RemovePrivateData function to xpubs
Browse files Browse the repository at this point in the history
  • Loading branch information
icellan committed Feb 17, 2022
1 parent 624a900 commit ca8042e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions model_xpubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,10 @@ func (m *Xpub) AfterUpdated(ctx context.Context) error {
func (m *Xpub) Migrate(client datastore.ClientInterface) error {
return client.IndexMetadata(client.GetTableName(tableXPubs), metadataField)
}

// RemovePrivateData unset all fields that are sensitive
func (m *Xpub) RemovePrivateData() {
m.NextExternalNum = 0
m.NextInternalNum = 0
m.Metadata = nil
}

0 comments on commit ca8042e

Please sign in to comment.