From aedecfebc645e4752f666afaffba4b70cb47e075 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Sun, 23 Oct 2022 09:45:41 +0200
Subject: [PATCH] fix protect access to the config

---
 api.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/api.go b/api.go
index 9dcbb03..b2a340d 100644
--- a/api.go
+++ b/api.go
@@ -62,5 +62,9 @@ func (s *Settings[C]) SetMnemonic(mnemonic string) *Settings[C] {
 // Remember that the configuration is a copy of the original configuration.
 // Changes to the configuration will not be reflected in the original configuration.
 func (s *Settings[C]) Config() C {
+
+	s.Lock()
+	defer s.Unlock()
+
 	return s.config
 }
-- 
GitLab