View on GitHub
File Changes

                      
    const unsignedTxResponse = buildUnsignedAccountTx(
      senderKey.to_public(),
-
      'ca1qw8mq0p65pf028qgd32t6szeatfd9epx4jyl5jeuuswtlkyqpdguqeh83d4',
+
      Buffer.from(RustModule.WalletV3.Address.from_string(
+
        'ca1qw8mq0p65pf028qgd32t6szeatfd9epx4jyl5jeuuswtlkyqpdguqeh83d4'
+
      ).as_bytes()).toString('hex'),
      {
        amount: new BigNumber(2000000)
      },

                      
    expect(() => buildUnsignedAccountTx(
      senderKey.to_public(),
-
      'ca1qw8mq0p65pf028qgd32t6szeatfd9epx4jyl5jeuuswtlkyqpdguqeh83d4',
+
      Buffer.from(RustModule.WalletV3.Address.from_string(
+
        'ca1qw8mq0p65pf028qgd32t6szeatfd9epx4jyl5jeuuswtlkyqpdguqeh83d4'
+
      ).as_bytes()).toString('hex'),
      {
        amount: new BigNumber(2000000),
      },

                      
    expect(() => buildUnsignedAccountTx(
      senderKey.to_public(),
-
      'ca1qw8mq0p65pf028qgd32t6szeatfd9epx4jyl5jeuuswtlkyqpdguqeh83d4',
+
      Buffer.from(RustModule.WalletV3.Address.from_string(
+
        'ca1qw8mq0p65pf028qgd32t6szeatfd9epx4jyl5jeuuswtlkyqpdguqeh83d4'
+
      ).as_bytes()).toString('hex'),
      {
        amount: new BigNumber(2000000),
      },
  typeSpecific: SendType,
  accountBalance: BigNumber,
): RustModule.WalletV3.InputOutput {
+
  const wasmReceiver = RustModule.WalletV3.Address.from_bytes(
+
    Buffer.from(receiver, 'hex')
+
  );
  if (typeSpecific.amount != null && typeSpecific.amount.gt(accountBalance)) {
    throw new NotEnoughMoneyToSendError();
  }

                      
    if (typeSpecific.amount != null) {
      fakeTxBuilder.add_output(
-
        RustModule.WalletV3.Address.from_string(receiver),
+
        wasmReceiver,
        // the value we put in here is irrelevant. Just need some value to be able to calculate fee
        RustModule.WalletV3.Value.from_str('1')
      );
  if (typeSpecific.amount != null) {
    const value = RustModule.WalletV3.Value.from_str(typeSpecific.amount.toString());
    ioBuilder.add_output(
-
      RustModule.WalletV3.Address.from_string(receiver),
+
      wasmReceiver,
      value
    );
  }