@@ -24,6 +24,7 @@ interface SafeWatcherOptions {
24
24
class SafeWatcher {
25
25
readonly #prefix: string ;
26
26
readonly #safe: Address ;
27
+ readonly #name: string ;
27
28
readonly #notificationSender?: INotificationSender ;
28
29
readonly #logger: Logger ;
29
30
readonly #api: ISafeAPI ;
@@ -33,10 +34,11 @@ class SafeWatcher {
33
34
#interval?: NodeJS . Timeout ;
34
35
35
36
constructor ( opts : SafeWatcherOptions ) {
36
- const [ prefix , address ] = parsePrefixedAddress ( opts . safe ) ;
37
+ const [ prefix , address , name ] = parsePrefixedAddress ( opts . safe ) ;
37
38
this . #logger = logger . child ( { chain : prefix , address } ) ;
38
39
this . #prefix = prefix ;
39
40
this . #safe = address ;
41
+ this . #name = name ;
40
42
this . #notificationSender = opts . notifier ;
41
43
this . #signers = opts . signers ?? { } ;
42
44
this . #api = new SafeApiWrapper ( opts . safe , opts . api ) ;
@@ -125,6 +127,7 @@ class SafeWatcher {
125
127
126
128
await this . #notificationSender?. notify ( {
127
129
type : isMalicious ? "malicious" : "created" ,
130
+ name : this . #name,
128
131
chainPrefix : this . #prefix,
129
132
safe : this . #safe,
130
133
tx : detailed ,
@@ -153,6 +156,7 @@ class SafeWatcher {
153
156
154
157
await this . #notificationSender?. notify ( {
155
158
type : tx . isExecuted ? "executed" : "updated" ,
159
+ name : this . #name,
156
160
chainPrefix : this . #prefix,
157
161
safe : this . #safe,
158
162
tx : detailed ,
0 commit comments