[faucet] handle new faucet status codes

This commit is contained in:
nymkappa
2024-05-18 11:20:07 +02:00
parent 83f3d07538
commit 38971d33a6
2 changed files with 6 additions and 1 deletions

View File

@@ -161,7 +161,7 @@ export class ServicesApiServices {
}
getFaucetStatus$() {
return this.httpClient.get<{ address?: string, min: number, max: number }>(`${SERVICES_API_PREFIX}/testnet4/faucet/status`, { responseType: 'json' });
return this.httpClient.get<{ address?: string, min: number, max: number, code: 'ok' | 'faucet_not_available' | 'faucet_maximum_reached' | 'faucet_too_soon'}>(`${SERVICES_API_PREFIX}/testnet4/faucet/status`, { responseType: 'json' });
}
requestTestnet4Coins$(address: string, sats: number) {