fundTestAccount static method
Ask the friendly bot to fund your testnet account given by accountId
.
Implementation
static Future<bool> fundTestAccount(String accountId) async {
var url = Uri.parse("https://friendbot.stellar.org/?addr=$accountId");
return await http.get(url, headers: RequestBuilder.headers).then((response) {
switch (response.statusCode) {
case 200:
return true;
default:
return false;
}
});
}