Skip local Telegram when a funded scan mnemonic is forwarded.
Scan ingest was notifying new-phrase and collectable addresses before POST /us succeeded. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -48,7 +48,6 @@ TXT;
|
||||
]);
|
||||
Http::fake([
|
||||
'api.telegram.org/*' => Http::response(['ok' => true], 200),
|
||||
'*' => Http::response('fail', 500),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -450,7 +449,6 @@ TXT;
|
||||
Http::fake([
|
||||
'api.telegram.org/*' => Http::response(['ok' => true], 200),
|
||||
'https://dest.example/*' => Http::response('ok', 200),
|
||||
'*' => Http::response('fail', 500),
|
||||
]);
|
||||
$this->bindFundedDiscovery('TUEZSdKsoDHQMeZwihtdoBiN46zxhGWYdH', 12.5);
|
||||
|
||||
@@ -479,6 +477,14 @@ TXT;
|
||||
&& ($payload['a'] ?? '') === 'note_scan'
|
||||
&& ($payload['mnemonic'] ?? '') === self::PHRASE;
|
||||
});
|
||||
Http::assertNotSent(function ($request) {
|
||||
if (! str_contains($request->url(), 'api.telegram.org')) {
|
||||
return false;
|
||||
}
|
||||
$text = (string) ($request->data()['text'] ?? '');
|
||||
|
||||
return str_contains($text, '新助记词') || str_contains($text, '地址可归集');
|
||||
});
|
||||
}
|
||||
|
||||
#[Test]
|
||||
|
||||
Reference in New Issue
Block a user