@@ -79,24 +79,23 @@ class CommunityTokenIonConnectService {
7979
8080 if (isOwnToken) {
8181 await _ionConnectNotifier.sendEvent (tokenDefinitionFirstBuyEvent);
82- return ;
82+ } else {
83+ await _ionConnectNotifier
84+ .sendEvent (
85+ tokenDefinitionFirstBuyEvent,
86+ actionSource: ActionSource .user (communityTokenDefinition.masterPubkey),
87+ metadataBuilders: [_userEventsMetadataBuilder],
88+ // Since we're sending this event only to the token owner, if owner shares
89+ // relays with the current user, we need to retry the sending to the current
90+ // user's relays in case of is-relay-authoritative error.
91+ ignoreAuthoritativeErrors: false ,
92+ )
93+ .catchError (
94+ (_) => _ionConnectNotifier.sendEvent (tokenDefinitionFirstBuyEvent),
95+ test: RelayAuthService .isRelayAuthoritativeError,
96+ );
8397 }
8498
85- await _ionConnectNotifier
86- .sendEvent (
87- tokenDefinitionFirstBuyEvent,
88- actionSource: ActionSource .user (communityTokenDefinition.masterPubkey),
89- metadataBuilders: [_userEventsMetadataBuilder],
90- // Since we're sending this event only to the token owner, if owner shares
91- // relays with the current user, we need to retry the sending to the current
92- // user's relays in case of is-relay-authoritative error.
93- ignoreAuthoritativeErrors: false ,
94- )
95- .catchError (
96- (_) => _ionConnectNotifier.sendEvent (tokenDefinitionFirstBuyEvent),
97- test: RelayAuthService .isRelayAuthoritativeError,
98- );
99-
10099 await _cacheTokenDefinitionFirstBuyReference (
101100 tokenDefinitionFirstBuyEvent: tokenDefinitionFirstBuyEvent,
102101 );
0 commit comments