tests done

This commit is contained in:
2021-12-28 02:50:54 -05:00
parent 07c38ce23e
commit 330548689a
19 changed files with 677 additions and 27 deletions

View File

@@ -52,6 +52,28 @@ func (m *Map) Delete() (err error) {
return
}
// Exists returns true if this Map actually exists.
func (m *Map) Exists() (exists bool, err error) {
if exists, err = m.folder.HasEntry(m.Name); err != nil {
return
}
return
}
// Rename renames this Map (changes its key).
func (m *Map) Rename(newName string) (err error) {
if err = m.folder.RenameEntry(m.Name, newName); err != nil {
return
}
m.Name = newName
return
}
// SetValue will replace this Map's Map.Value.
func (m *Map) SetValue(newValue map[string]string) (err error) {
@@ -70,6 +92,10 @@ func (m *Map) Update() (err error) {
var call *dbus.Call
var b []byte
if err = m.folder.wallet.walletCheck(); err != nil {
return
}
if call = m.Dbus.Call(
DbusWMReadMap, 0, m.folder.wallet.handle, m.folder.Name, m.Name, m.folder.wallet.wm.AppID,
); call.Err != nil {