Skip to content

Commit

Permalink
Merge pull request #668 from breez/fix-test
Browse files Browse the repository at this point in the history
fix test
  • Loading branch information
ubbabeck authored Oct 10, 2023
2 parents 5218f56 + 41ac49e commit e60f50a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion lib/bloc/account/account_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ class AccountBloc extends Cubit<AccountState> with HydratedMixin {
}) async {
_log.fine("addInvoice: $description, $amountSats");

final requestData = sdk.ReceivePaymentRequest(amountSats: amountSats, description: description, openingFeeParams: chosenFeeParams);
final requestData = sdk.ReceivePaymentRequest(
amountSats: amountSats, description: description, openingFeeParams: chosenFeeParams);
final responseData = await _breezLib.receivePayment(reqData: requestData);
return responseData;
}
Expand Down
7 changes: 3 additions & 4 deletions lib/routes/create_invoice/create_invoice_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,9 @@ class CreateInvoicePageState extends State<CreateInvoicePage> {
final currencyBloc = context.read<CurrencyBloc>();

Future<ReceivePaymentResponse> receivePaymentResponse = accountBloc.addInvoice(
description: _descriptionController.text,
amountSats: currencyBloc.state.bitcoinCurrency.parse(_amountController.text),
chosenFeeParams: cheapestFeeParams
);
description: _descriptionController.text,
amountSats: currencyBloc.state.bitcoinCurrency.parse(_amountController.text),
chosenFeeParams: cheapestFeeParams);
navigator.pop();
Widget dialog = FutureBuilder(
future: receivePaymentResponse,
Expand Down
2 changes: 1 addition & 1 deletion test/bloc/account/account_bloc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void main() {
injector.keychain.write(CredentialsManager.accountMnemonic, "a3eed");
AccountBloc accBloc = AccountBloc(breezLib, CredentialsManager(keyChain: injector.keychain));

await accBloc.connect(mnemonic: testMnemonic);
await accBloc.connect(mnemonic: testMnemonic, restored: true);
var accountState = accBloc.state;
expect(accountState.blockheight, greaterThan(1));
expect(accountState.id?.length, equals(66));
Expand Down

0 comments on commit e60f50a

Please sign in to comment.