@@ -2730,20 +2730,6 @@ def GetItemFromDict(self, data, search):
27302730 return None
27312731 #end define
27322732
2733- def GetAutoTransferRules (self ):
2734- autoTransferRules = self .local .db .get ("autoTransferRules" )
2735- if autoTransferRules is None :
2736- autoTransferRules = list ()
2737- self .local .db ["autoTransferRules" ] = autoTransferRules
2738- return autoTransferRules
2739- #end define
2740-
2741- def AddAutoTransferRule (self , rule ):
2742- autoTransferRules = self .GetAutoTransferRules ()
2743- autoTransferRules .append (rule )
2744- self .local .save ()
2745- #end define
2746-
27472733 def AddBookmark (self , bookmark ):
27482734 if "bookmarks" not in self .local .db :
27492735 self .local .db ["bookmarks" ] = list ()
@@ -2760,40 +2746,24 @@ def GetBookmarks(self):
27602746 return bookmarks
27612747 #end define
27622748
2763- def GetBookmarkAddr (self , type , name ):
2764- bookmarks = self .local .db .get ("bookmarks" , list ())
2765- for bookmark in bookmarks :
2766- bookmarkType = bookmark .get ("type" )
2767- bookmarkName = bookmark .get ("name" )
2768- bookmarkAddr = bookmark .get ("addr" )
2769- if (bookmarkType == type and bookmarkName == name ):
2770- return bookmarkAddr
2771- raise Exception ("GetBookmarkAddr error: Bookmark not found" )
2772- #end define
2773-
2774- def DeleteBookmark (self , name , type ):
2749+ def DeleteBookmark (self , name ):
27752750 bookmarks = self .local .db .get ("bookmarks" )
27762751 for bookmark in bookmarks :
2777- bookmarkType = bookmark .get ("type" )
2778- bookmarkName = bookmark .get ("name" )
2779- if (type == bookmarkType and name == bookmarkName ):
2752+ bookmark_name = bookmark .get ("name" )
2753+ if name == bookmark_name :
27802754 bookmarks .remove (bookmark )
27812755 self .local .save ()
27822756 return
27832757 raise Exception ("DeleteBookmark error: Bookmark not found" )
27842758 #end define
27852759
27862760 def WriteBookmarkData (self , bookmark ):
2787- type = bookmark .get ("type" )
2788- if type == "account" :
2789- addr = bookmark .get ("addr" )
2790- account = self .GetAccount (addr )
2791- if account .status == "empty" :
2792- data = "empty"
2793- else :
2794- data = account .balance
2761+ addr = bookmark .get ("addr" )
2762+ account = self .GetAccount (addr )
2763+ if account .status == "empty" :
2764+ data = "empty"
27952765 else :
2796- data = "null"
2766+ data = account . balance
27972767 bookmark ["data" ] = data
27982768 #end define
27992769
0 commit comments