Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BitcoinZavior committed Nov 8, 2024
1 parent c137fe0 commit 59962f2
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 21 deletions.
34 changes: 13 additions & 21 deletions ios/Classes/frb_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,20 @@ typedef struct wire_cst_rbf_value {
union RbfValueKind kind;
} wire_cst_rbf_value;

typedef struct wire_cst_list_prim_usize_strict {
uintptr_t *ptr;
typedef struct wire_cst_list_prim_u_32_strict {
uint32_t *ptr;
int32_t len;
} wire_cst_list_prim_usize_strict;
} wire_cst_list_prim_u_32_strict;

typedef struct wire_cst_record_string_list_prim_usize_strict {
typedef struct wire_cst_record_string_list_prim_u_32_strict {
struct wire_cst_list_prim_u_8_strict *field0;
struct wire_cst_list_prim_usize_strict *field1;
} wire_cst_record_string_list_prim_usize_strict;
struct wire_cst_list_prim_u_32_strict *field1;
} wire_cst_record_string_list_prim_u_32_strict;

typedef struct wire_cst_list_record_string_list_prim_usize_strict {
struct wire_cst_record_string_list_prim_usize_strict *ptr;
typedef struct wire_cst_list_record_string_list_prim_u_32_strict {
struct wire_cst_record_string_list_prim_u_32_strict *ptr;
int32_t len;
} wire_cst_list_record_string_list_prim_usize_strict;
} wire_cst_list_record_string_list_prim_u_32_strict;

typedef struct wire_cst_AddressError_Base58 {
struct wire_cst_list_prim_u_8_strict *field0;
Expand Down Expand Up @@ -536,11 +536,6 @@ typedef struct wire_cst_list_pk_or_f {
int32_t len;
} wire_cst_list_pk_or_f;

typedef struct wire_cst_list_prim_u_32_strict {
uint32_t *ptr;
int32_t len;
} wire_cst_list_prim_u_32_strict;

typedef struct wire_cst_list_prim_u_64_strict {
uint64_t *ptr;
int32_t len;
Expand Down Expand Up @@ -1207,8 +1202,8 @@ void frbgen_bdk_flutter_wire__crate__api__wallet__tx_builder_finish(int64_t port
bool drain_wallet,
struct wire_cst_bdk_script_buf *drain_to,
struct wire_cst_rbf_value *rbf,
struct wire_cst_list_record_string_list_prim_usize_strict *internal_policy_path,
struct wire_cst_list_record_string_list_prim_usize_strict *external_policy_path,
struct wire_cst_list_record_string_list_prim_u_32_strict *internal_policy_path,
struct wire_cst_list_record_string_list_prim_u_32_strict *external_policy_path,
struct wire_cst_list_prim_u_8_loose *data);

void frbgen_bdk_flutter_rust_arc_increment_strong_count_RustOpaque_bdkbitcoinAddress(const void *ptr);
Expand Down Expand Up @@ -1357,11 +1352,9 @@ struct wire_cst_list_prim_u_8_loose *frbgen_bdk_flutter_cst_new_list_prim_u_8_lo

struct wire_cst_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_prim_u_8_strict(int32_t len);

struct wire_cst_list_prim_usize_strict *frbgen_bdk_flutter_cst_new_list_prim_usize_strict(int32_t len);

struct wire_cst_list_record_list_prim_u_32_strict_list_condition *frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition(int32_t len);

struct wire_cst_list_record_string_list_prim_usize_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict(int32_t len);
struct wire_cst_list_record_string_list_prim_u_32_strict *frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict(int32_t len);

struct wire_cst_list_record_u_32_list_condition *frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition(int32_t len);

Expand Down Expand Up @@ -1425,9 +1418,8 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_64_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_loose);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_u_8_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_prim_usize_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_list_prim_u_32_strict_list_condition);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_usize_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_script_amount);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_transaction_details);
Expand Down
44 changes: 44 additions & 0 deletions test/bdk_flutter_test.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,15 @@ class MockWallet extends _i1.Mock implements _i3.Wallet {
returnValue: _i4.Future<void>.value(),
returnValueForMissingStub: _i4.Future<void>.value(),
) as _i4.Future<void>);

@override
_i3.Policy? policies(_i3.KeychainKind? keychain) => (super.noSuchMethod(
Invocation.method(
#policies,
[keychain],
),
returnValueForMissingStub: null,
) as _i3.Policy?);
}

/// A class which mocks [Transaction].
Expand Down Expand Up @@ -1695,6 +1704,41 @@ class MockTxBuilder extends _i1.Mock implements _i3.TxBuilder {
),
) as _i3.TxBuilder);

@override
_i3.TxBuilder policyPath(
_i3.KeychainKind? keychain,
Map<String, _i7.Uint32List>? path,
) =>
(super.noSuchMethod(
Invocation.method(
#policyPath,
[
keychain,
path,
],
),
returnValue: _FakeTxBuilder_14(
this,
Invocation.method(
#policyPath,
[
keychain,
path,
],
),
),
returnValueForMissingStub: _FakeTxBuilder_14(
this,
Invocation.method(
#policyPath,
[
keychain,
path,
],
),
),
) as _i3.TxBuilder);

@override
_i3.TxBuilder onlySpendChange() => (super.noSuchMethod(
Invocation.method(
Expand Down

0 comments on commit 59962f2

Please sign in to comment.