Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Issue: Incompatible Type (BigInt vs int) #332

Closed
aniketambore opened this issue Oct 30, 2024 · 9 comments
Closed

Build Issue: Incompatible Type (BigInt vs int) #332

aniketambore opened this issue Oct 30, 2024 · 9 comments

Comments

@aniketambore
Copy link
Contributor

I’m encountering a compile-time error when building the project from the source. Specifically, I receive the following error across multiple parts of the codebase:

The argument type 'BigInt' can't be assigned to the parameter type 'int'.

The error appears to be related to the boltz_dart and lwk_dart plugins, as the affected code segments often involve these dependencies. I'm not sure whether any manual configuration or compatible version adjustments are required for these plugins to work properly in the project.

I resolved an earlier pub get issue:

aniket:~$flutter pub get
Resolving dependencies... (2.5s)
Because every version of boltz_dart from git depends on flutter_rust_bridge 2.0.0 and
bdk_flutter >=0.31.2-dev depends on flutter_rust_bridge >2.0.0-dev.30 <=2.0.0-dev.31,
boltz_dart from git is incompatible with bdk_flutter >=0.31.2-dev.
And because every version of bb_mobile from path depends on bdk_flutter ^0.31.2-dev,
boltz_dart from git is incompatible with bb_mobile from path.
So, because widget_catalog depends on bb_mobile from path which depends on boltz_dart
from git, version solving failed.

by adding the following dependency override to pubspec.yaml:

dependency_overrides:
  flutter_rust_bridge: ^2.0.0

But, the BigInt vs int type mismatch persists and blocks the build process. I would appreciate any help or guidance regarding the correct versions or configurations needed to solve this issue.

@i5hi
Copy link
Collaborator

i5hi commented Oct 30, 2024

Hey @aniketambore

We have been waiting for bdk-flutter to upgrade to the same frb version: LtbLightning/bdk-flutter#145

Will check in on this and update bullbitcoin-mobile to use the latest commit of bdk-flutter in pubspec

@i5hi
Copy link
Collaborator

i5hi commented Oct 30, 2024

Okay seems to be a bit more involved than just this. Taking a look.

@i5hi
Copy link
Collaborator

i5hi commented Oct 30, 2024

So there are two issues:

  1. bdk-flutter should use the latest branch from that PR so there are no collisions in flutter_rust_bridge - we should all use 2.0.0 (which we recently updated boltz and lwk to)

  2. frb 2.0.0 seems to be using BigInt where it used to be int; so we have to add manual type cases everywhere in the usage

if you are up to take this up as a PR that would be amazing! I will review it tomorrow. Either way I will make sure this is closed by the end of the week.

Thanks for the issue!

@i5hi
Copy link
Collaborator

i5hi commented Oct 30, 2024

we also need to downgrade shareplus - another client brought up this issue when upgrading lwk-dart

we can downgrade to 9 and update usage within logger.dart


      final fileName = 'bull-bitcoin-${DateTime.now().toIso8601String()}.log';
      Share.shareXFiles(
        [
          XFile.fromData(
            utf8.encode(logDump),
            mimeType: 'text/plain',
            name: fileName,
          ),
        ],
        // fileNameOverrides: [fileName],
      );

@aniketambore
Copy link
Contributor Author

I've made the changes as suggested, but the issue still persists. Here’s a summary of what I have done so far and the errors I’m encountering:

  • I added the required type casting wherever necessary.
  • Downgraded the share_plus plugin to version 9.0.0 and updated its usage accordingly.

Despite these adjustments, I encounter multiple errors, particularly with the bdk_flutter plugin:

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:19:7: Error: The non-abstract class 'CApi' is missing implementations for these members:
- BaseEntrypoint.rustContentHash
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.

class CApi extends BaseEntrypoint<CApiApi, CApiApiImpl, CApiWire> {
^^^^
../../../.pub-cache/hosted/pub.dev/flutter_rust_bridge-2.0.0/lib/src/main_components/entrypoint.dart:122:11: Context: 'BaseEntrypoint.rustContentHash' is defined here.
int get rustContentHash;
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/blockchain.dart:18:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/blockchain.dart:21:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:17:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:20:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:36:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:39:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:55:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:58:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:74:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart:77:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart:17:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart:20:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart:36:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart:39:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/psbt.dart:16:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/psbt.dart:19:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/types.dart:17:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/types.dart:20:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/wallet.dart:66:9: Error: Superclass has no constructor named 'RustOpaque.dcoDecode'.
: super.dcoDecode(wire, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/wallet.dart:69:9: Error: Superclass has no constructor named 'RustOpaque.sseDecode'.
: super.sseDecode(ptr, externalSizeOnNative, _kStaticData);
^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:2574:7: Error: No named parameter with the name 'hint'.
hint: hint,
^^^^
../../../.pub-cache/hosted/pub.dev/flutter_rust_bridge-2.0.0/lib/src/task.dart:50:9: Context: Found this candidate, but the arguments don't match.
const NormalTask({
^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:4052:12: Error: The method 'dcoDecodeI64OrU64' isn't defined for the class 'CApiApiImpl'.
- 'CApiApiImpl' is from 'package:bdk_flutter/src/generated/frb_generated.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart').
Try correcting the name to the name of an existing method, or defining a method named 'dcoDecodeI64OrU64'.
return dcoDecodeI64OrU64(raw);
^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:4076:12: Error: The method 'dcoDecodeI64OrU64' isn't defined for the class 'CApiApiImpl'.
- 'CApiApiImpl' is from 'package:bdk_flutter/src/generated/frb_generated.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart').
Try correcting the name to the name of an existing method, or defining a method named 'dcoDecodeI64OrU64'.
return dcoDecodeI64OrU64(raw);
^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5534:32: Error: The method 'getUint64' isn't defined for the class 'ReadBuffer'.
- 'ReadBuffer' is from 'package:flutter_rust_bridge/src/third_party/flutter_foundation_serialization/read_buffer.dart' ('../../../.pub-cache/hosted/pub.dev/flutter_rust_bridge-2.0.0/lib/src/third_party/flutter_foundation_serialization/read_buffer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'getUint64'.
return deserializer.buffer.getUint64();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5558:32: Error: The method 'getUint64' isn't defined for the class 'ReadBuffer'.
- 'ReadBuffer' is from 'package:flutter_rust_bridge/src/third_party/flutter_foundation_serialization/read_buffer.dart' ('../../../.pub-cache/hosted/pub.dev/flutter_rust_bridge-2.0.0/lib/src/third_party/flutter_foundation_serialization/read_buffer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'getUint64'.
return deserializer.buffer.getUint64();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5586:16: Error: The method 'cstEncode' isn't defined for the class 'AnyBlockchain'.
- 'AnyBlockchain' is from 'package:bdk_flutter/src/generated/api/blockchain.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/blockchain.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5593:16: Error: The method 'cstEncode' isn't defined for the class 'ExtendedDescriptor'.
- 'ExtendedDescriptor' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5601:16: Error: The method 'cstEncode' isn't defined for the class 'MutexPartiallySignedTransaction'.
- 'MutexPartiallySignedTransaction' is from 'package:bdk_flutter/src/generated/api/psbt.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/psbt.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5609:16: Error: The method 'cstEncode' isn't defined for the class 'MutexBdkWalletAnyDatabase'.
- 'MutexBdkWalletAnyDatabase' is from 'package:bdk_flutter/src/generated/api/wallet.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/wallet.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5616:16: Error: The method 'cstEncode' isn't defined for the class 'BdkBitcoinAddress'.
- 'BdkBitcoinAddress' is from 'package:bdk_flutter/src/generated/api/types.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/types.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5624:16: Error: The method 'cstEncode' isn't defined for the class 'BitcoinBip32DerivationPath'.
- 'BitcoinBip32DerivationPath' is from 'package:bdk_flutter/src/generated/api/key.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5632:16: Error: The method 'cstEncode' isn't defined for the class 'KeysDescriptorPublicKey'.
- 'KeysDescriptorPublicKey' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5640:16: Error: The method 'cstEncode' isn't defined for the class 'KeysDescriptorSecretKey'.
- 'KeysDescriptorSecretKey' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5647:16: Error: The method 'cstEncode' isn't defined for the class 'KeysKeyMap'.
- 'KeysKeyMap' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5654:16: Error: The method 'cstEncode' isn't defined for the class 'KeysBip39Mnemonic'.
- 'KeysBip39Mnemonic' is from 'package:bdk_flutter/src/generated/api/key.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart').
Try correcting the name to the name of an existing method, or defining a method named 'cstEncode'.
return raw.cstEncode();
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5739:27: Error: The method 'sseEncode' isn't defined for the class 'AnyBlockchain'.
- 'AnyBlockchain' is from 'package:bdk_flutter/src/generated/api/blockchain.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/blockchain.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5746:27: Error: The method 'sseEncode' isn't defined for the class 'ExtendedDescriptor'.
- 'ExtendedDescriptor' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5753:27: Error: The method 'sseEncode' isn't defined for the class 'MutexPartiallySignedTransaction'.
- 'MutexPartiallySignedTransaction' is from 'package:bdk_flutter/src/generated/api/psbt.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/psbt.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5760:27: Error: The method 'sseEncode' isn't defined for the class 'MutexBdkWalletAnyDatabase'.
- 'MutexBdkWalletAnyDatabase' is from 'package:bdk_flutter/src/generated/api/wallet.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/wallet.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5767:27: Error: The method 'sseEncode' isn't defined for the class 'BdkBitcoinAddress'.
- 'BdkBitcoinAddress' is from 'package:bdk_flutter/src/generated/api/types.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/types.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5774:27: Error: The method 'sseEncode' isn't defined for the class 'BitcoinBip32DerivationPath'.
- 'BitcoinBip32DerivationPath' is from 'package:bdk_flutter/src/generated/api/key.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5781:27: Error: The method 'sseEncode' isn't defined for the class 'KeysDescriptorPublicKey'.
- 'KeysDescriptorPublicKey' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5788:27: Error: The method 'sseEncode' isn't defined for the class 'KeysDescriptorSecretKey'.
- 'KeysDescriptorSecretKey' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5795:27: Error: The method 'sseEncode' isn't defined for the class 'KeysKeyMap'.
- 'KeysKeyMap' is from 'package:bdk_flutter/src/generated/api/descriptor.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/descriptor.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:5802:27: Error: The method 'sseEncode' isn't defined for the class 'KeysBip39Mnemonic'.
- 'KeysBip39Mnemonic' is from 'package:bdk_flutter/src/generated/api/key.dart' ('../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/api/key.dart').
Try correcting the name to the name of an existing method, or defining a method named 'sseEncode'.
sse_encode_usize(self.sseEncode(move: null), serializer);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:7024:23: Error: The method 'putUint64' isn't defined for the class 'WriteBuffer'.
- 'WriteBuffer' is from 'package:flutter_rust_bridge/src/third_party/flutter_foundation_serialization/write_buffer.dart' ('../../../.pub-cache/hosted/pub.dev/flutter_rust_bridge-2.0.0/lib/src/third_party/flutter_foundation_serialization/write_buffer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'putUint64'.
serializer.buffer.putUint64(self);
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/bdk_flutter-0.31.2-dev.2/lib/src/generated/frb_generated.dart:7047:23: Error: The method 'putUint64' isn't defined for the class 'WriteBuffer'.
- 'WriteBuffer' is from 'package:flutter_rust_bridge/src/third_party/flutter_foundation_serialization/write_buffer.dart' ('../../../.pub-cache/hosted/pub.dev/flutter_rust_bridge-2.0.0/lib/src/third_party/flutter_foundation_serialization/write_buffer.dart').
Try correcting the name to the name of an existing method, or defining a method named 'putUint64'.
serializer.buffer.putUint64(self);
^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:
Script '/Users/aniketambore/Developer/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1629

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/aniketambore/Developer/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
Error: Gradle task assembleDebug failed with exit code 1


Exited (1).

I attempted to clean and rebuild the project (flutter clean and pub get).

@i5hi
Copy link
Collaborator

i5hi commented Nov 1, 2024

you need to upgrade bdk also in pubspec

@i5hi
Copy link
Collaborator

i5hi commented Nov 1, 2024

  bdk_flutter:
    git:
      url: https://github.com/LtbLightning/bdk-flutter
      ref: 6cbadd9d7267d0fbb8626dfb403fb5d562046543

@aniketambore
Copy link
Contributor Author

@i5hi I think that in previous versions, there was an option in the app settings to switch the network to testnet, but I don’t see it in this version. Would changing the default value of the testnet field to true here in NetworkState is the correct way to set the app to testnet by default?

@i5hi
Copy link
Collaborator

i5hi commented Nov 4, 2024

https://github.com/SatoshiPortal/bullbitcoin-mobile/blob/main/lib/settings/bitcoin_settings_page.dart#L55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants