<|start_filename|>lib/bus/update_history_event.dart<|end_filename|>

import 'package:event_taxi/event_taxi.dart';

class UpdateHistoryEvent implements Event {
}

<|start_filename|>test/json_rpc/model/request/findoperation_request_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.findoperation_request', () {
    test('can serialize findoperation', () {
      FindOperationRequest request = FindOperationRequest(ophash: '1234');
      expect(json.encode(request.toJson()),
          '{"jsonrpc":"2.0","method":"findoperation","id":0,"params":{"ophash":"1234"}}');
    });
  });
}


<|start_filename|>lib/appstate_container.dart<|end_filename|>
import 'dart:async';

import 'package:blaise_wallet_flutter/bus/events.dart';
import 'package:blaise_wallet_flutter/model/available_currency.dart';
import 'package:blaise_wallet_flutter/model/available_languages.dart';
import 'package:blaise_wallet_flutter/model/available_themes.dart';
import 'package:blaise_wallet_flutter/model/db/appdb.dart';
import 'package:blaise_wallet_flutter/model/db/contact.dart';
import 'package:blaise_wallet_flutter/network/model/request/subscribe_request.dart';
import 'package:blaise_wallet_flutter/network/model/response/subscribe_response.dart';
import 'package:blaise_wallet_flutter/network/ws_client.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/store/wallet/wallet.dart';
import 'package:blaise_wallet_flutter/themes.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:event_taxi/event_taxi.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:pascaldart/pascaldart.dart';

final Wallet walletState = Wallet();

const List<String> PREACHED_SVG_ASSETS = [
  'assets/illustration_backup.svg',
  'assets/illustration_backup_dark.svg',
  'assets/illustration_new_wallet.svg',
  'assets/illustration_new_wallet_dark.svg',
  'assets/illustration_security.svg',
  'assets/illustration_security_dark.svg',
  'assets/illustration_two_options.svg',
  'assets/illustration_two_options_dark.svg',
  'assets/illustration_borrowed.svg',
  'assets/illustration_borrowed_dark.svg',
];

class _InheritedStateContainer extends InheritedWidget {
  // Data is your entire state. In our case just 'User'
  final StateContainerState data;

  // You must pass through a child and your state.
  _InheritedStateContainer({
    Key key,
    @required this.data,
    @required Widget child,
  }) : super(key: key, child: child);

  // This is a built in method which you can use to check if
  // any state has changed. If not, no reason to rebuild all the widgets
  // that rely on your state.
  @override
  bool updateShouldNotify(_InheritedStateContainer old) => true;
}

class StateContainer extends StatefulWidget {
  // You must pass through a child.
  final Widget child;

  StateContainer({@required this.child});

  // This is the secret sauce. Write your own 'of' method that will behave
  // Exactly like MediaQuery.of and Theme.of
  // It basically says 'get the data from the widget of this type.
  static StateContainerState of(BuildContext context) {
    return (context.inheritFromWidgetOfExactType(_InheritedStateContainer)
            as _InheritedStateContainer)
        .data;
  }

  @override
  StateContainerState createState() => StateContainerState();
}

/// App InheritedWidget
/// This is where we handle the global state and also where
/// we interact with the server and make requests/handle+propagate responses
///
/// Basically the central hub behind the entire app
class StateContainerState extends State<StateContainer> {
  // Theme
  BaseTheme curTheme = BlaiseLightTheme();

  // Language
  LanguageSetting curLanguage = LanguageSetting(AvailableLanguage.DEFAULT);

  // Currency
  String currencyLocale;
  Locale deviceLocale = Locale('en', 'US');
  AvailableCurrency curCurrency = AvailableCurrency(AvailableCurrencyEnum.USD);

  // Helper FN to precache SVG assets for performance
  Future<void> _precacheSvgs() async {
    PREACHED_SVG_ASSETS.forEach((asset) {
      precachePicture(
          ExactAssetPicture(SvgPicture.svgStringDecoder, asset), context);
    });
  }

  // Change language
  void updateLanguage(LanguageSetting language) {
    setState(() {
      curLanguage = language;
    });
  }

  // Change the theme
  Future<void> updateTheme(ThemeSetting theme, {bool setIcon = true}) async {
    if (theme != null && theme.getTheme() != curTheme) {
      if (mounted) {
        setState(() {
          this.curTheme = theme.getTheme();
        });
      }
      await sl.get<SharedPrefsUtil>().setTheme(theme);
    }
    if (setIcon) {
      AppIcon.setAppIcon(theme.getTheme().appIcon);
    }
  }

  /// Add donations contact if it hasnt already been added
  Future<void> _addSampleContact() async {
    bool contactAdded = await sl.get<SharedPrefsUtil>().getFirstContactAdded();
    if (!contactAdded) {
      bool addressExists = await sl.get<DBHelper>().contactExistsWithAccount(
          AccountNumber.fromInt(1185729));
      if (addressExists) {
        return;
      }
      bool nameExists = await sl.get<DBHelper>().contactExistsWithName("BlaiseDonations");
      if (nameExists) {
        return;
      }
      await sl.get<SharedPrefsUtil>().setFirstContactAdded(true);
      Contact c = Contact(
          name: "BlaiseDonations",
          account:
              AccountNumber.fromInt(1185729),
          payload: "Thanks!");
      await sl.get<DBHelper>().saveContact(c);
    }
  }

  StreamSubscription<ConnStatusEvent> _connStatusSub;
  StreamSubscription<SubscribeEvent> _subscribeEventSub;
  StreamSubscription<PriceEvent> _priceEventSub;
  StreamSubscription<NewOperationEvent> _newOpSub;

  // Register RX event listenerss
  void _registerBus() {
    _subscribeEventSub = EventTaxiImpl.singleton().registerTo<SubscribeEvent>().listen((event) {
      handleSubscribeResponse(event.response);
    });
    _priceEventSub = EventTaxiImpl.singleton().registerTo<PriceEvent>().listen((event) {
      // PriceResponse's get pushed periodically, it wasn't a request we made so don't pop the queue
      walletState.btcPrice = event.response.btcPrice;
      walletState.localCurrencyPrice = event.response.price;
    });
    _connStatusSub = EventTaxiImpl.singleton().registerTo<ConnStatusEvent>().listen((event) {
      if (event.status == ConnectionStatus.CONNECTED) {
        walletState.requestUpdate();
      } else if (event.status == ConnectionStatus.DISCONNECTED && !sl.get<WSClient>().suspended) {
        sl.get<WSClient>().initCommunication();
      }
    });
    _newOpSub = EventTaxiImpl.singleton().registerTo<NewOperationEvent>().listen((event) {
      walletState.addNewOp(event.operation);
    });
  }

  void _destroyBus() {
    if (_connStatusSub != null) {
      _connStatusSub.cancel();
    }
    if (_subscribeEventSub != null) {
      _subscribeEventSub.cancel();
    }
    if (_priceEventSub != null) {
      _priceEventSub.cancel();
    }
    if (_newOpSub != null) {
      _newOpSub.cancel();
    }
  }

  @override
  void initState() {
    super.initState();
    _registerBus();
    // Precache SVG Assets
    _precacheSvgs();
    // Set initial theme
    sl.get<SharedPrefsUtil>().getTheme().then((themeSetting) {
      updateTheme(themeSetting, setIcon: false);
    });
    // Add initial contact if not already present
    _addSampleContact();
    // Set currency locale here for the UI to access
    sl.get<SharedPrefsUtil>().getCurrency(deviceLocale).then((currency) {
      setState(() {
        currencyLocale = currency.getLocale().toString();
        curCurrency = currency;
      });
    });
    // Get default language setting
    sl.get<SharedPrefsUtil>().getLanguage().then((language) {
      setState(() {
        curLanguage = language;
      });
    });
  }

  @override
  void dispose() {
    _destroyBus();
    super.dispose();
  }

  /// Handle account_subscribe response
  void handleSubscribeResponse(SubscribeResponse response) {
    // Set currency locale here for the UI to access
    sl.get<SharedPrefsUtil>().getCurrency(deviceLocale).then((currency) {
      setState(() {
        currencyLocale = currency.getLocale().toString();
        curCurrency = currency;
      });
    });
    // Server gives us a UUID for future requests on subscribe
    if (response.uuid != null) {
      sl.get<SharedPrefsUtil>().setUuid(response.uuid);
    }
    walletState.localCurrencyPrice = response.price;
    walletState.btcPrice = response.btcPrice;
    walletState.hasExceededBorrowLimit = !response.borrowEligible;
    walletState.hasReceivedSubscribeResponse = true;
    sl.get<WSClient>().pop();
    sl.get<WSClient>().processQueue();
  }

  @override
  Widget build(BuildContext context) {
    return _InheritedStateContainer(
      data: this,
      child: widget.child,
    );
  }
}


<|start_filename|>lib/ui/widgets/operation_list_item.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:quiver/strings.dart';

enum OperationType {
  Received,
  Sent,
  NameChanged,
  ListedForSale,
  DelistedForSale,
  Welcome
}

/// A widget for displaying a mnemonic phrase
class OperationListItem extends StatefulWidget {
  final OperationType type;
  final String amount;
  final String address;
  final String date;
  final String payload;
  final Function onPressed;
  final String name;
  final String price;
  final bool isContact;

  OperationListItem({
    this.type,
    this.amount,
    this.address,
    this.date,
    this.payload,
    this.onPressed,
    this.name,
    this.price,
    this.isContact = false
  });

  _OperationListItemState createState() => _OperationListItemState();
}

class _OperationListItemState extends State<OperationListItem> {
  @override
  Widget build(BuildContext context) {
    return Column(children: <Widget>[
      Container(
        width: double.maxFinite,
        height: widget.type == OperationType.Welcome ? null : 74,
        child: FlatButton(
          padding: EdgeInsetsDirectional.only(start: 24, end: 24),
          onPressed: () {
            if (widget.onPressed != null) {
              widget.onPressed();
            }
            return;
          },
          splashColor: StateContainer.of(context).curTheme.primary30,
          highlightColor: StateContainer.of(context).curTheme.primary15,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0)),
          child: widget.type == OperationType.Welcome
              ? Container(
                  margin: EdgeInsetsDirectional.fromSTEB(30, 16, 30, 16),
                  child: AutoSizeText.rich(
                    TextSpan(
                        children: formatLocalizedColors(context,
                            AppLocalization.of(context).newAccountParagraph)),
                    stepGranularity: 0.5,
                    maxLines: 3,
                    minFontSize: 8,
                    textAlign: TextAlign.center,
                    style: TextStyle(fontSize: 14),
                  ),
                )
              : Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: <Widget>[
                    Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        // Operation Type
                        Container(
                          padding: EdgeInsetsDirectional.fromSTEB(8, 4, 8, 4),
                          decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(100),
                              color: widget.type == OperationType.Received
                                  ? StateContainer.of(context).curTheme.primary
                                  : widget.type == OperationType.Sent
                                      ? StateContainer.of(context)
                                          .curTheme
                                          .textDark
                                      : StateContainer.of(context)
                                          .curTheme
                                          .secondary),
                          child: AutoSizeText(
                            widget.type == OperationType.Received
                                ? AppLocalization.of(context).receivedHeader
                                : widget.type == OperationType.Sent
                                    ? AppLocalization.of(context).sentHeader
                                    : widget.type == OperationType.NameChanged
                                        ? AppLocalization.of(context)
                                            .nameChangedHeader
                                        : widget.type ==
                                                OperationType.ListedForSale
                                            ? AppLocalization.of(context)
                                                .listedForSaleHeader
                                            : widget.type ==
                                                    OperationType
                                                        .DelistedForSale
                                                ? AppLocalization.of(context)
                                                    .delistedHeader
                                                : AppLocalization.of(context)
                                                    .undefinedHeader,
                            style: AppStyles.operationType(context),
                          ),
                        ),
                        // Amount & Payload indicator or New Account Name
                        widget.type == OperationType.DelistedForSale
                            ? SizedBox()
                            : Container(
                                width:
                                    MediaQuery.of(context).size.width / 2 - 72,
                                margin: EdgeInsetsDirectional.only(top: 4),
                                child: widget.type == OperationType.Received ||
                                        widget.type == OperationType.Sent ||
                                        widget.type ==
                                            OperationType.ListedForSale
                                    ? AutoSizeText.rich(
                                        TextSpan(
                                          children: [
                                            TextSpan(
                                              text: "",
                                              style: widget.type ==
                                                      OperationType.Received
                                                  ? AppStyles
                                                      .iconFontPrimaryBalanceSmallPascal(
                                                          context)
                                                  : widget.type ==
                                                          OperationType.Sent
                                                      ? AppStyles
                                                          .iconFontTextDarkBalanceSmallPascal(
                                                              context)
                                                      : AppStyles
                                                          .iconFontSecondarySmallPascal(
                                                              context),
                                            ),
                                            TextSpan(
                                                text: " ",
                                                style: TextStyle(fontSize: 7)),
                                            TextSpan(
                                                text: widget.type ==
                                                            OperationType
                                                                .Received ||
                                                        widget.type ==
                                                            OperationType.Sent
                                                    ? widget.amount
                                                    : widget.price,
                                                style: widget.type ==
                                                        OperationType.Received
                                                    ? AppStyles.balanceSmall(
                                                        context)
                                                    : widget.type ==
                                                            OperationType.Sent
                                                        ? AppStyles
                                                            .balanceSmallTextDark(
                                                                context)
                                                        : AppStyles
                                                            .balanceSmallSecondary(
                                                                context)),
                                            isNotEmpty(widget.payload)
                                                ? TextSpan(
                                                    text: " ",
                                                    style:
                                                        TextStyle(fontSize: 14))
                                                : TextSpan(),
                                            isNotEmpty(widget.payload)
                                                ? TextSpan(
                                                    text: "",
                                                    style: widget.type ==
                                                            OperationType
                                                                .Received
                                                        ? AppStyles
                                                            .iconFontPrimaryBalanceSmallest(
                                                                context)
                                                        : AppStyles
                                                            .iconFontTextDarkBalanceSmallest(
                                                                context),
                                                  )
                                                : TextSpan(),
                                          ],
                                        ),
                                        textAlign: TextAlign.start,
                                        maxLines: 1,
                                        minFontSize: 4,
                                        stepGranularity: 1,
                                        style: TextStyle(
                                          fontSize: 14,
                                        ),
                                      )
                                    : widget.type == OperationType.NameChanged
                                        ? AutoSizeText(
                                            widget.name,
                                            textAlign: TextAlign.start,
                                            maxLines: 1,
                                            minFontSize: 4,
                                            stepGranularity: 1,
                                            style:
                                                AppStyles.balanceSmallSecondary(
                                                    context),
                                          )
                                        : SizedBox(),
                              ),
                      ],
                    ),
                    Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        widget.type == OperationType.Received ||
                                widget.type == OperationType.Sent
                            ?
                            // Address
                            widget.isContact
                                ? Container(
                                    width:
                                        MediaQuery.of(context).size.width / 2 -
                                            72,
                                    margin:
                                        EdgeInsetsDirectional.only(bottom: 4),
                                    alignment: Alignment(1, 0),
                                    child: AutoSizeText.rich(
                                      TextSpan(children: [
                                        TextSpan(
                                          text: " ",
                                          style: AppStyles.iconFontPrimarySmall(
                                              context),
                                        ),
                                        TextSpan(
                                          text: widget.address,
                                          style: AppStyles.contactsItemName(
                                              context),
                                        ),
                                      ]),
                                      maxLines: 1,
                                      stepGranularity: 0.1,
                                      textAlign: TextAlign.end,
                                      style: TextStyle(
                                        fontSize: 14,
                                      ),
                                    ),
                                  )
                                : Container(
                                    width:
                                        MediaQuery.of(context).size.width / 2 -
                                            72,
                                    margin:
                                        EdgeInsetsDirectional.only(bottom: 4),
                                    alignment: Alignment(1, 0),
                                    child: AutoSizeText(
                                      widget.address,
                                      style: AppStyles.monoTextDarkSmall400(
                                          context),
                                      maxLines: 1,
                                      stepGranularity: 0.1,
                                      textAlign: TextAlign.end,
                                    ),
                                  )
                            : SizedBox(),
                        // Date
                        Container(
                          width: MediaQuery.of(context).size.width / 2 - 72,
                          alignment: Alignment(1, 0),
                          child: AutoSizeText(
                            widget.date,
                            style: AppStyles.operationDate(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                            textAlign: TextAlign.end,
                          ),
                        ),
                      ],
                    ),
                  ],
                ),
        ),
      ),
      Container(
        width: double.maxFinite,
        height: 1,
        color: StateContainer.of(context).curTheme.textDark10,
      )
    ]);
  }
}


<|start_filename|>lib/ui/widgets/app_text_field.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

/// TextField button
class TextFieldButton extends StatelessWidget {
  final IconData icon;
  final Function onPressed;

  TextFieldButton({@required this.icon, this.onPressed});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 38,
      width: 38,
      decoration: BoxDecoration(
        shape: BoxShape.circle,
        gradient: StateContainer.of(context).curTheme.gradientPrimary,
      ),
      child: FlatButton(
        padding: EdgeInsets.all(0),
        shape: CircleBorder(),
        onPressed: () {
          return onPressed != null ? onPressed() : null;
        },
        splashColor: StateContainer.of(context).curTheme.backgroundPrimary30,
        highlightColor: StateContainer.of(context).curTheme.backgroundPrimary15,
        child: Icon(
          icon,
          size: 22,
          color: StateContainer.of(context).curTheme.backgroundPrimary,
        ),
      ),
    );
  }
}

/// A widget for our custom textfields
class AppTextField extends StatefulWidget {
  final String label;
  final TextFieldButton firstButton;
  final TextFieldButton secondButton;
  final TextEditingController controller;
  final FocusNode focusNode;
  final TextCapitalization textCapitalization;
  final TextInputType inputType;
  final TextStyle style;
  final bool passwordField;
  final Widget prefix;
  final int maxLines;
  final List<TextInputFormatter> inputFormatters;
  final Function onChanged;
  final Function onTap;
  final bool readOnly;
  final TextInputAction textInputAction;
  final Function onSubmitted;

  AppTextField(
      {@required this.label,
      @required this.style,
      this.firstButton,
      this.secondButton,
      this.controller,
      this.focusNode,
      this.textCapitalization,
      this.inputType = TextInputType.text,
      this.prefix,
      this.maxLines,
      this.inputFormatters,
      this.onChanged,
      this.onTap,
      this.onSubmitted,
      this.passwordField = false,
      this.readOnly = false,
      this.textInputAction = TextInputAction.done});

  _AppTextFieldState createState() => _AppTextFieldState();
}

class _AppTextFieldState extends State<AppTextField> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Container(
          alignment: Alignment(-1, 0),
          child: AutoSizeText(
            widget.label,
            style: AppStyles.textFieldLabel(context),
          ),
        ),
        Container(
          child: Theme(
              data: ThemeData(
                primaryColor: StateContainer.of(context).curTheme.primary,
                hintColor: StateContainer.of(context).curTheme.primary,
                splashColor: StateContainer.of(context).curTheme.primary30,
                highlightColor: StateContainer.of(context).curTheme.primary15,
                textSelectionColor:
                    StateContainer.of(context).curTheme.primary30,
              ),
              child: Stack(
                alignment: AlignmentDirectional.center,
                children: <Widget>[
                  TextField(
                    readOnly: widget.readOnly,
                    controller: widget.controller,
                    focusNode: widget.focusNode,
                    obscureText: widget.passwordField,
                    style: widget.style,
                    cursorColor: StateContainer.of(context).curTheme.primary,
                    keyboardType: widget.inputType,
                    autocorrect: false,
                    textCapitalization:
                        widget.textCapitalization ?? TextCapitalization.none,
                    textInputAction: widget.textInputAction,
                    maxLines: widget.maxLines,
                    minLines: 1,
                    onSubmitted: (text) {
                      if (widget.textInputAction == TextInputAction.done && widget.onSubmitted == null) {
                        FocusScope.of(context).unfocus();
                      } else if (widget.onSubmitted != null) {
                        widget.onSubmitted();
                      }
                    },
                    inputFormatters: widget.inputFormatters,
                    onTap: widget.onTap,
                    onChanged: (String newValue) {
                      if (widget.onChanged != null) {
                        widget.onChanged(newValue);
                      }
                    },
                    decoration: InputDecoration(
                      enabledBorder: UnderlineInputBorder(
                        borderSide: BorderSide(
                            color: StateContainer.of(context).curTheme.primary),
                      ),
                      focusedBorder: UnderlineInputBorder(
                        borderSide: BorderSide(
                            color: StateContainer.of(context).curTheme.primary,
                            width: 2),
                      ),
                      errorBorder: UnderlineInputBorder(
                        borderSide: BorderSide(
                            color: StateContainer.of(context).curTheme.danger,
                            width: 2),
                      ),
                      prefix: widget.prefix,
                      suffixIcon: widget.firstButton == null &&
                              widget.secondButton == null
                          ? Container(
                            width: 0,
                            height: 0,
                          )
                          : Container(
                              width: widget.firstButton == null ||
                                      widget.secondButton == null
                                  ? 50
                                  : 100,
                              height: 38,
                            ),
                    ),
                  ),
                  // Buttons
                  Column(
                    mainAxisSize: MainAxisSize.max,
                    children: <Widget>[
                      Row(
                        mainAxisAlignment: MainAxisAlignment.end,
                        children: <Widget>[
                          widget.secondButton != null
                              ? Container(
                                  margin: EdgeInsetsDirectional.only(start: 12),
                                  width: 38,
                                  height: 38,
                                  child: widget.secondButton)
                              : SizedBox(),
                          widget.firstButton != null
                              ? Container(
                                  margin: EdgeInsetsDirectional.only(start: 12),
                                  width: 38,
                                  height: 38,
                                  child: widget.firstButton)
                              : SizedBox()
                        ],
                      ),
                    ],
                  )
                ],
              )),
        ),
      ],
    );
  }
}


<|start_filename|>lib/network/model/response/borrow_response.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'borrow_response.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

BorrowResponse _$BorrowResponseFromJson(Map<String, dynamic> json) {
  return BorrowResponse()
    ..account = intToAccountNum(json['pasa'] as int)
    ..expiry = _toDateTime(json['expires'] as int)
    ..price = pascalToCurrency(json['price'] as num)
    ..paid = json['paid'] as bool
    ..transferred = json['transferred'] as bool;
}

Map<String, dynamic> _$BorrowResponseToJson(BorrowResponse instance) {
  final val = <String, dynamic>{
    'pasa': accountNumToInt(instance.account),
  };

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('expires', _fromDateTime(instance.expiry));
  writeNotNull('price', currencyToDouble(instance.price));
  val['paid'] = instance.paid;
  val['transferred'] = instance.transferred;
  return val;
}


<|start_filename|>lib/model/db/contact.dart<|end_filename|>
import 'package:flutter/material.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:quiver/core.dart';

part 'contact.g.dart';

@JsonSerializable()
class Contact {
  @JsonKey(ignore:true)
  int id;
  @JsonKey(name:'name')
  String name;
  @JsonKey(name:'account', fromJson: intToAccountNum, toJson: accountNumToInt)
  AccountNumber account;
  @JsonKey(name:'payload')
  String payload;

  Contact({@required this.name, @required this.account, this.id, this.payload = ""});

  factory Contact.fromJson(Map<String, dynamic> json) => _$ContactFromJson(json);
  Map<String, dynamic> toJson() => _$ContactToJson(this);

  bool operator ==(o) => o is Contact && o.name == name && o.account == account && o.payload == payload;
  int get hashCode => hash3(name.hashCode, account.hashCode, payload.hashCode);
}

<|start_filename|>test/json_rpc/model/request/getpendings_request_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.getpendings_request', () {
    test('can serialize getpendings', () {
      GetPendingsRequest request = GetPendingsRequest(max: 0);
      expect(json.encode(request.toJson()),
          '{"jsonrpc":"2.0","method":"getpendings","id":0,"params":{"max":0}}');
    });
  });
}


<|start_filename|>test/common/coding/pascal/currency_coder_test.dart<|end_filename|>
import 'package:pascaldart/common.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('common.coding.pascal.CurrencyCoder', () {
    CurrencyCoder coder;
    setUp(() {
      coder = CurrencyCoder();
    });
    test('can encode a pascalcoin currency', () {
      expect(PDUtil.byteToHex(coder.encodeToBytes(Currency('0.0015'))),
          '0F00000000000000');
    });
    test('can decode a pascalcoin currency', () {
      expect(
          coder
              .decodeFromBytes(PDUtil.hexToBytes('0F00000000000000'))
              .toString(),
          '0.0015');
      expect(
          coder.decodeFromBytes(
              PDUtil.hexToBytes('0474657374'.padRight(16, '0'))) is Currency,
          true);
    });
  });
}


<|start_filename|>lib/util/pascal_util.dart<|end_filename|>
import 'package:pascaldart/pascaldart.dart';

/// A higher-level wrapper for pascaldart functions
class PascalUtil {
  /// Generates a new key pair
  KeyPair generateKeyPair() {
    return Keys.generate(curve: Curve.getDefaultCurve());
  }

  /// Turns a string into a pascal PublicKey object, returns null if invalid
  PublicKey decipherPublicKey(String publicKey) {
    try {
      PublicKey pubKey = PublicKeyCoder().decodeFromBase58(publicKey.trim());
      return pubKey;
    } catch (e) {
      try {
        PublicKey pubKey = PublicKeyCoder().decodeFromBytes(PDUtil.hexToBytes(publicKey.trim()));
        return pubKey;
      } catch (e) {
        return null;
      }
    }
  }
}

<|start_filename|>lib/ui/util/formatters.dart<|end_filename|>
import 'package:blaise_wallet_flutter/util/number_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:intl/intl.dart';

/// For Pascal Accounts
class PascalAccountFormatter extends TextInputFormatter {
  @override
  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    // Ensure only one - is present
    if (newValue.text.isNotEmpty && newValue.text.allMatches('-').length > 1) {
      return oldValue;
    } else if (newValue.text.isNotEmpty && newValue.text.contains('-')) {
      // Ensure only two digits after "-"
      if (newValue.text.length - newValue.text.indexOf('-') > 3) {
        return oldValue;
      }  
    }
    return newValue;
  }
}

/// For Pascal Names
class PascalNameFormatter extends TextInputFormatter {
  @override
  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    // Ensure first character is not a number
    if (newValue.text.startsWith(RegExp(r"[0-9]"))) {
      return oldValue;
    }
    return newValue;
  }
}

/// For phone numbers
/// Ensures no more than 20 digits
/// Ensures hyphens only occur after a number
class PhoneNumberFormatter extends TextInputFormatter {
  @override
  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    // Check digit count, 20 is max
    if (newValue.text.replaceAll(RegExp(r"[^0-9]"), "").length > 20) {
      return oldValue;
    }
    // Ensure only 1 hyphen after a number
    if (newValue.text.endsWith("-") && oldValue.text.endsWith("-")) {
      return oldValue;
    }
    return newValue;
  }
}

/// Input formatter for Crpto/Fiat amounts
class CurrencyFormatter extends TextInputFormatter {

  String commaSeparator;
  String decimalSeparator;
  int maxDecimalDigits;

  CurrencyFormatter({this.commaSeparator = ",", this.decimalSeparator = ".", this.maxDecimalDigits = NumberUtil.maxDecimalDigits});

  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    bool returnOriginal = true;
    if (newValue.text.contains(decimalSeparator) || newValue.text.contains(commaSeparator)) {
      returnOriginal = false;
    }

    // If no text, or text doesnt contain a period of comma, no work to do here
    if(newValue.selection.baseOffset == 0 || returnOriginal) {
      return newValue;
    }

    String workingText = newValue.text.replaceAll(commaSeparator, decimalSeparator);
    // if contains more than 2 decimals in newValue, return oldValue
    if (decimalSeparator.allMatches(workingText).length > 1) {
      return newValue.copyWith(
        text: oldValue.text,
        selection: new TextSelection.collapsed(offset: oldValue.text.length));
    } else if (workingText.startsWith(decimalSeparator)) {
      workingText = "0" + workingText;
    }

    List<String> splitStr = workingText.split(decimalSeparator);
    // If this string contains more than 1 decimal, move all characters to after the first decimal
    if (splitStr.length > 2) {
      returnOriginal = false;
      splitStr.forEach((val) {
        if (splitStr.indexOf(val) > 1) {
          splitStr[1] += val;
        }
      });
    }
    if (splitStr[1].length <= maxDecimalDigits) {
      if (workingText == newValue.text) {
        return newValue;
      } else {
        return newValue.copyWith(
          text: workingText,
          selection: new TextSelection.collapsed(offset: workingText.length));
       }
    }
    String newText = splitStr[0] + decimalSeparator + splitStr[1].substring(0, maxDecimalDigits);
    return newValue.copyWith(
      text: newText,
      selection: new TextSelection.collapsed(offset: newText.length));
  }
}

class LocalCurrencyFormatter extends TextInputFormatter {
  NumberFormat currencyFormat;
  bool active;

  LocalCurrencyFormatter({this.currencyFormat, this.active});

  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    if (newValue.text.isEmpty) {
      // Return empty string
      return newValue.copyWith(
        text: "",
        selection: new TextSelection.collapsed(offset: 0));
    }
    // Ensure our input is in the right formatting here
    if (active) {
      // Make local currency = amount with correct decimal separator
      String curText = newValue.text;
      String shouldBeText = NumberUtil.sanitizeNumber(curText.replaceAll(",", "."));
      shouldBeText = shouldBeText.replaceAll(".", currencyFormat.symbols.DECIMAL_SEP);
      if (shouldBeText != curText) {
        return newValue.copyWith(
          text: shouldBeText,
          selection: TextSelection.collapsed(offset: shouldBeText.length));
      }
    } else {
      // Make crypto amount formatted as US locale
      String curText = newValue.text;
      String shouldBeText = NumberUtil.sanitizeNumber(curText.replaceAll(",", "."));
      if (shouldBeText != curText) {
        return newValue.copyWith(
          text: shouldBeText,
          selection: TextSelection.collapsed(offset: shouldBeText.length));
      }
    }
    return newValue;
  }
}


/// Ensures input is always uppercase
class UpperCaseTextFormatter extends TextInputFormatter {
  @override
  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    return TextEditingValue(
      text: newValue.text?.toUpperCase(),
      selection: newValue.selection,
    );
  }
}

/// Ensures input is always lowercase
class LowerCaseTextFormatter extends TextInputFormatter {
  @override
  TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
    return TextEditingValue(
      text: newValue.text?.toLowerCase(),
      selection: newValue.selection,
    );
  }
}

<|start_filename|>lib/network/http_client.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/request/borrow_request.dart';
import 'package:blaise_wallet_flutter/network/model/request/freepasa_get_request.dart';
import 'package:blaise_wallet_flutter/network/model/request/freepasa_verify_request.dart';
import 'package:blaise_wallet_flutter/network/model/request/getborrowed_request.dart';
import 'package:blaise_wallet_flutter/network/model/response/borrow_response.dart';
import 'package:blaise_wallet_flutter/network/model/response/getborrowed_response.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';

import 'package:logger/logger.dart';

/// Blaise HTTP API Client
class HttpAPI {
  static const String API_URL = 'https://blaiseapi.appditto.com/v1';
  static Logger log = sl.get<Logger>();


  static Future<BorrowResponse> getBorrowed(String b58pubkey) async {
    try {
      GetBorrowedRequest request = GetBorrowedRequest(b58pubkey: b58pubkey);
      http.Response response = await http.post(API_URL, body: json.encode(request.toJson()));
      if (response.statusCode != 200) {
        return null;
      }
      Map<dynamic, dynamic> jsonResp = json.decode(response.body);
      if (jsonResp.containsKey('borrowed_account') && jsonResp['borrowed_account'] != '') {
        GetBorrowedResponse bResp = GetBorrowedResponse.fromJson(jsonResp);
        return bResp.account;
      } else if (jsonResp['borrowed_account'] == '') {
        return BorrowResponse();
      }
      return null;
    } catch (e) {
      return null;
    }
  }

  static Future<BorrowResponse> borrowAccount(String b58pubkey) async {
    try {
      BorrowRequest request = BorrowRequest(b58pubkey: b58pubkey);
      http.Response response = await http.post(API_URL, body: json.encode(request.toJson()));
      if (response.statusCode != 200) {
        return null;
      }
      Map<dynamic, dynamic> jsonResp = json.decode(response.body);
      if (jsonResp.containsKey('pasa')) {
        BorrowResponse bResp = BorrowResponse.fromJson(jsonResp);
        return bResp;
      }
      return null;
    } catch (e) {
      return null;
    }
  }

  /// Request a FreePASA, using phone number
  /// Response is a request ID, which can be used in the verify phone number request
  static Future<String> getFreePASA(String isoCode, String phoneNumber, String b58pubkey) async {
    try {
      FreePASAGetRequest request = FreePASAGetRequest(
        phoneIso: isoCode,
        phoneNumber: phoneNumber,
        b58pubkey: b58pubkey
      );
      http.Response response = await http.post(API_URL, body: json.encode(request.toJson()));
      if (response.statusCode != 200) {
        return null;
      }
      Map<dynamic, dynamic> jsonResp = json.decode(response.body);
      if (jsonResp.containsKey('success')) {
        return jsonResp['success'];
      }
      return null;
    } catch (e) {
      return null;
    }
  }

  /// Verify a FreePASA, using phone number
  /// Response is the account that has been received
  static Future<int> verifyFreePASA(String requestId, String code) async {
    try {
      FreePASAVerifyRequest request = FreePASAVerifyRequest(
        requestId: requestId,
        code: code
      );
      http.Response response = await http.post(API_URL, body: json.encode(request.toJson()));
      if (response.statusCode != 200) {
        log.d("RECEIVED STATUS CODE NOT OK ${response.statusCode}");
        return null;
      }
      Map<dynamic, dynamic> jsonResp = json.decode(response.body);
      log.d("Received response ${response.body}");
      if (jsonResp.containsKey('success')) {
        log.d("New account is ${jsonResp['success']}");
        return int.parse(jsonResp['success'].toString());
      }
      return null;
    } catch (e) {
      log.e("Caughe exception in freepasa request ${e.toString()}", e);
      return null;
    }
  }
}

<|start_filename|>lib/network/model/request/getborrowed_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';

part 'getborrowed_request.g.dart';

@JsonSerializable()
class GetBorrowedRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'b58_pubkey')
  String b58pubkey;

  GetBorrowedRequest({this.action = "getborrowed", this.b58pubkey}) : super();

  factory GetBorrowedRequest.fromJson(Map<String, dynamic> json) => _$GetBorrowedRequestFromJson(json);
  Map<String, dynamic> toJson() => _$GetBorrowedRequestToJson(this);
}

<|start_filename|>lib/ui/overview/buy_account_sheet.dart<|end_filename|>
import 'dart:ui';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/routes.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/svg_repaint.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:pascaldart/pascaldart.dart';

class BuyAccountSheet extends StatefulWidget {
  _BuyAccountSheetState createState() => _BuyAccountSheetState();
}

class _BuyAccountSheetState extends State<BuyAccountSheet> {
  String accountPrice = "0.25";
  String fiatPrice = "";
  String returnInDays = "3";

  OverlayEntry _overlay;

  void showOverlay(BuildContext context) {
    OverlayState overlayState = Overlay.of(context);
    _overlay = OverlayEntry(
      builder: (context) => BackdropFilter(
        filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
        child: Container(
          width: double.maxFinite,
          height: double.maxFinite,
          color: StateContainer.of(context).curTheme.overlay20,
          child: Center(
            child: //Container for the animation
                Container(
              margin: EdgeInsetsDirectional.only(
                  top: MediaQuery.of(context).padding.top),
              //Width/Height ratio for the animation is needed because BoxFit is not working as expected
              width: double.maxFinite,
              height: MediaQuery.of(context).size.width,
              child: Center(
                child: FlareActor(
                  StateContainer.of(context).curTheme.animationGetAccount,
                  animation: "main",
                  fit: BoxFit.contain,
                ),
              ),
            ),
          ),
        ),
      ),
    );
    overlayState.insert(_overlay);
  }

  @override
  Widget build(BuildContext context) {
    fiatPrice = walletState.getLocalCurrencyDisplay(
        currency: StateContainer.of(context).curCurrency,
        amount: Currency(accountPrice),
        decimalDigits: 2);
    return Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  height: 60,
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient:
                        StateContainer.of(context).curTheme.gradientPrimary,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                      // Header
                      Container(
                        width: MediaQuery.of(context).size.width - 130,
                        alignment: Alignment(0, 0),
                        child: AutoSizeText(
                          toUppercase(AppLocalization.of(context)
                              .buyAccountSheetHeader
                              ,context),
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          textAlign: TextAlign.center,
                        ),
                      ),
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    children: <Widget>[
                      // Container for the illustration
                      Container(
                        margin: EdgeInsetsDirectional.only(
                          top: 30,
                        ),
                        child: SvgRepaintAsset(
                            asset: StateContainer.of(context)
                                .curTheme
                                .illustrationBorrowed,
                            width: MediaQuery.of(context).size.width *
                                (UIUtil.smallScreen(context) ? 0.6 : 0.8),
                            height: MediaQuery.of(context).size.width *
                                (UIUtil.smallScreen(context) ? 0.6 : 0.8) *
                                132 /
                                295),
                      ),
                      // Paragraph
                      Container(
                        margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                        child: AutoSizeText.rich(
                          TextSpan(
                            children: formatLocalizedColors(
                                context,
                                AppLocalization.of(context)
                                    .borrowAccountParagraph.replaceAll("%1", accountPrice).replaceAll("%2", "~" + fiatPrice).replaceAll("%3", returnInDays)),
                          ),
                          stepGranularity: 0.5,
                          maxLines: 9,
                          minFontSize: 8,
                          style: TextStyle(fontSize: 14),
                        ),
                      ),
                    ],
                  ),
                ),
                //"Borrow an Account" and "Cancel" buttons
                Row(
                  children: <Widget>[
                    Observer(
                      builder: (context) {
                        bool disabled = !walletState.isBorrowEligible || walletState.hasExceededBorrowLimit;
                        return AppButton(
                          type: AppButtonType.Primary,
                          text: toUppercase(AppLocalization.of(context)
                              .borrowAnAccountButton
                              ,context),
                          disabled: disabled,
                          buttonTop: true,
                          onPressed: () async {
                            if (!walletState.isBorrowEligible) {
                              return;
                            }
                            showOverlay(context);
                            dynamic resp = await walletState.initiateBorrow();
                            if (walletState.borrowedAccount != null) {
                              _overlay?.remove();
                              walletState.loadWallet();
                              if (resp is PascalAccount) {
                                Navigator.of(context).pushReplacementNamed('/account', arguments: resp);
                              } else {
                                Navigator.of(context).popUntil(RouteUtils.withNameLike('/overview'));
                                UIUtil.showSnackbar(AppLocalization.of(context).borrowStarted.replaceAll('%1', walletState.borrowedAccount.account.toString()), context);
                              }
                            } else {
                              _overlay?.remove();
                              Navigator.of(context).popUntil(RouteUtils.withNameLike('/overview'));
                              UIUtil.showSnackbar(AppLocalization.of(context).somethingWentWrongError, context);
                            }
                          },
                        );
                      },
                    ),
                  ],
                ),
                // "Close" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.PrimaryOutline,
                      text: toUppercase(AppLocalization.of(context)
                          .cancelButton
                          ,context),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}


<|start_filename|>test/json_rpc/model/pascal_block_test.dart<|end_filename|>
import 'package:pascaldart/common.dart';
import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.pascal_block', () {
    test('can serialize block response', () {
      Map<String, dynamic> rawResponse = {
        "jsonrpc": "2.0",
        "id": 123,
        "result": {
          "block": 8888,
          "enc_pubkey":
              "<KEY>",
          "reward": 100,
          "fee": 0,
          "ver": 1,
          "ver_a": 0,
          "timestamp": 1473161258,
          "target": 559519020,
          "nonce": 131965022,
          "payload":
              "New Node 9/4/2016 10:10:13 PM - Pascal Coin Miner & Explorer Build:1.0.2.0",
          "sbh":
              "5B75D33D9EFBF560EF5DA9B4A603528808626FE6C1FCEC44F83AF2330C6607EF",
          "oph":
              "81BE87831F03A2FE272C89BC6D2406DD57614846D9CEF30096BF574AB4AB3EE9",
          "pow":
              "00000000213A39EBBAB6D1FAEAA1EE528E398A587848F81FF66F7DA6113FC754",
          "operations": 1
        }
      };

      BaseResponse baseResp = BaseResponse.fromJson(rawResponse);
      expect(baseResp.jsonrpc, "2.0");
      expect(baseResp.id, 123);
      PascalBlock block = PascalBlock.fromJson(baseResp.result);
      expect(block.block, 8888);
      expect(PDUtil.byteToHex(PublicKeyCoder().encodeToBytes(block.encPubkey)),
          '<KEY>');
      expect(block.reward.toStringOpt(), '100');
      expect(block.fee.toStringOpt(), '0');
      expect(block.ver, 1);
      expect(block.ver_a, 0);
      expect(block.timestamp.millisecondsSinceEpoch ~/ 1000, 1473161258);
      expect(block.target, 559519020);
      expect(block.nonce, 131965022);
      expect(block.payload,
          "New Node 9/4/2016 10:10:13 PM - Pascal Coin Miner & Explorer Build:1.0.2.0");
      expect(block.sbh,
          "5B75D33D9EFBF560EF5DA9B4A603528808626FE6C1FCEC44F83AF2330C6607EF");
      expect(block.oph,
          "81BE87831F03A2FE272C89BC6D2406DD57614846D9CEF30096BF574AB4AB3EE9");
      expect(block.pow,
          "00000000213A39EBBAB6D1FAEAA1EE528E398A587848F81FF66F7DA6113FC754");
      expect(block.operations, 1);
    });
  });
}


<|start_filename|>lib/ui/intro/intro_security_first.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/svg_repaint.dart';
import 'package:blaise_wallet_flutter/util/pascal_util.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';

class IntroSecurityFirstPage extends StatefulWidget {
  @override
  _IntroSecurityFirstPageState createState() => _IntroSecurityFirstPageState();
}

class _IntroSecurityFirstPageState extends State<IntroSecurityFirstPage> {
  var _scaffoldKey = GlobalKey<ScaffoldState>();

  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      key: _scaffoldKey,
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      body: LayoutBuilder(
        builder: (context, constraints) => Column(
          children: <Widget>[
            //A widget that holds welcome animation + paragraph
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  // Container for the header
                  Container(
                    padding: EdgeInsetsDirectional.only(
                      top: (MediaQuery.of(context).padding.top) +
                          (24 - (MediaQuery.of(context).padding.top) / 2),
                    ),
                    decoration: BoxDecoration(
                      gradient:
                          StateContainer.of(context).curTheme.gradientPrimary,
                    ),
                    // Row for back button and the header
                    child: Row(
                      children: <Widget>[
                        // The header
                        Container(
                          width: MediaQuery.of(context).size.width - 60,
                          margin:
                              EdgeInsetsDirectional.fromSTEB(30, 24, 30, 24),
                          child: AutoSizeText(
                            AppLocalization.of(context).securityFirstHeader,
                            style: AppStyles.header(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                          ),
                        ),
                      ],
                    ),
                  ),
                  Expanded(
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        // Container for the illustration
                        Container(
                          margin: EdgeInsetsDirectional.only(top: 10),
                          child: SvgRepaintAsset(
                            asset: StateContainer.of(context)
                                .curTheme
                                .illustrationSecurity,
                            width: MediaQuery.of(context).size.width *
                                (UIUtil.smallScreen(context) ? 0.35 : 0.5),
                            height: MediaQuery.of(context).size.width *
                                (UIUtil.smallScreen(context) ? 0.35 : 0.5) *
                                (213 / 230),
                          ),
                        ),
                        //Container for the paragraph
                        Container(
                          alignment: Alignment(-1, 0),
                          margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).newKeySecurityParagraph,
                            maxLines: 4,
                            stepGranularity: 0.1,
                            style: AppStyles.paragraph(context),
                          ),
                        ),
                        //Container for the paragraph
                        Container(
                          alignment: Alignment(-1, 0),
                          margin: EdgeInsetsDirectional.fromSTEB(30, 10, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context)
                                .uninstallDisclaimerParagraph,
                            maxLines: 3,
                            stepGranularity: 0.1,
                            style: AppStyles.paragraphPrimary(context),
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),

            //"I've Backed It Up" and "Go Back" buttons
            Row(
              children: <Widget>[
                AppButton(
                  type: AppButtonType.Primary,
                  text: AppLocalization.of(context).gotItButton,
                  buttonTop: true,
                  onPressed: () {
                    sl
                        .get<Vault>()
                        .setPrivateKey(
                            sl.get<PascalUtil>().generateKeyPair().privateKey)
                        .then((key) {
                      Navigator.of(context).pushNamed('/intro_new_private_key');
                    });
                  },
                ),
              ],
            ),
            // "Go Back" button
            Row(
              children: <Widget>[
                AppButton(
                  type: AppButtonType.PrimaryOutline,
                  text: AppLocalization.of(context).goBackButton,
                  onPressed: () {
                    Navigator.of(context).pop();
                  },
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}


<|start_filename|>lib/ui/account/other_operations/delist_for_sale/delisted_for_sale.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:pascaldart/pascaldart.dart';

class DelistedForSaleSheet extends StatefulWidget {
  final AccountNumber account;
  final Currency fee;

  DelistedForSaleSheet({@required this.account, @required this.fee}) : super();

  _DelistedForSaleSheetState createState() => _DelistedForSaleSheetState();
}

class _DelistedForSaleSheetState extends State<DelistedForSaleSheet> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient: LinearGradient(
                        begin: Alignment.topCenter,
                        end: Alignment.bottomCenter,
                        stops: [
                          0.0,
                          0.7,
                          0.7,
                          1.0
                        ],
                        colors: [
                          StateContainer.of(context).curTheme.success,
                          StateContainer.of(context).curTheme.success,
                          StateContainer.of(context).curTheme.backgroundPrimary,
                          StateContainer.of(context).curTheme.backgroundPrimary,
                        ]),
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Container(
                    margin: EdgeInsetsDirectional.only(top: 8),
                    child: Column(
                      children: <Widget>[
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: <Widget>[
                            // Sized Box
                            SizedBox(
                              height: 50,
                              width: 65,
                            ),
                            // Header
                            Container(
                              width: MediaQuery.of(context).size.width - 130,
                              alignment: Alignment(0, 0),
                              child: AutoSizeText(
                                toUppercase(AppLocalization.of(context)
                                    .delistedSheetHeader
                                    ,context),
                                style: AppStyles.header(context),
                                maxLines: 1,
                                stepGranularity: 0.1,
                                textAlign: TextAlign.center,
                              ),
                            ),
                            // Sized Box
                            SizedBox(
                              height: 50,
                              width: 65,
                            ),
                          ],
                        ),
                        // Tick
                        Container(
                          margin: EdgeInsetsDirectional.only(top: 8),
                          height: 110,
                          width: 110,
                          decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(100),
                            color: StateContainer.of(context).curTheme.success,
                            boxShadow: [
                              StateContainer.of(context)
                                  .curTheme
                                  .shadowTextDarkTwo
                            ],
                          ),
                          child: Icon(
                            AppIcons.tick,
                            size: 40,
                            color: StateContainer.of(context)
                                .curTheme
                                .backgroundPrimary,
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
                Expanded(
                  child: SingleChildScrollView(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        // Paragraph
                        Container(
                          width: double.maxFinite,
                          margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context)
                                .delistedFromSaleParagraph,
                            style: AppStyles.paragraph(context),
                            stepGranularity: 0.1,
                            maxLines: 3,
                            minFontSize: 8,
                          ),
                        ),
                        // "Account" header
                        Container(
                          margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).accountTextFieldHeader,
                            style: AppStyles.textFieldLabelSuccess(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                            textAlign: TextAlign.start,
                          ),
                        ),
                        // Container for the account number
                        Container(
                          margin: EdgeInsetsDirectional.fromSTEB(30, 12, 30, 0),
                          padding: EdgeInsetsDirectional.fromSTEB(12, 8, 12, 8),
                          decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(12),
                            border: Border.all(
                                width: 1,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textDark15),
                            color:
                                StateContainer.of(context).curTheme.textDark10,
                          ),
                          child: AutoSizeText(
                            widget.account.toString(),
                            maxLines: 1,
                            stepGranularity: 0.1,
                            minFontSize: 8,
                            textAlign: TextAlign.center,
                            style: AppStyles.privateKeyTextDark(context),
                          ),
                        ),
                        // "Fee" header
                        widget.fee != Currency("0")
                            ? Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 30, 30, 0),
                                child: AutoSizeText(
                                  AppLocalization.of(context)
                                      .feeTextFieldHeader,
                                  style:
                                      AppStyles.textFieldLabelSuccess(context),
                                  maxLines: 1,
                                  stepGranularity: 0.1,
                                  textAlign: TextAlign.start,
                                ),
                              )
                            : SizedBox(),
                        // Container for the fee
                        widget.fee != Currency("0")
                            ? Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 12, 30, 0),
                                padding: EdgeInsetsDirectional.fromSTEB(
                                    12, 8, 12, 8),
                                decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(12),
                                  border: Border.all(
                                      width: 1,
                                      color: StateContainer.of(context)
                                          .curTheme
                                          .success15),
                                  color: StateContainer.of(context)
                                      .curTheme
                                      .success10,
                                ),
                                child: AutoSizeText.rich(
                                  TextSpan(
                                    children: [
                                      TextSpan(
                                        text: "",
                                        style: AppStyles
                                            .iconFontSuccessBalanceSmallPascal(
                                                context),
                                      ),
                                      TextSpan(
                                          text: " ",
                                          style: TextStyle(fontSize: 8)),
                                      TextSpan(
                                          text: widget.fee.toStringOpt(),
                                          style: AppStyles.balanceSmallSuccess(
                                              context)),
                                    ],
                                  ),
                                  textAlign: TextAlign.center,
                                  maxLines: 1,
                                  minFontSize: 8,
                                  stepGranularity: 1,
                                  style: TextStyle(
                                    fontSize: 14,
                                  ),
                                ),
                              )
                            : SizedBox(),
                        // Bottom Margin
                        SizedBox(height: 24),
                      ],
                    ),
                  ),
                ),
                // "CANCEL" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.SuccessOutline,
                      text: AppLocalization.of(context).closeButton,
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}


<|start_filename|>lib/ui/widgets/settings_list_item.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';

/// A widget for displaying a mnemonic phrase
class SettingsListItem extends StatefulWidget {
  final String header;
  final String subheader;
  final String contactName;
  final String contactAddress;
  final IconData icon;
  final Function onPressed;
  final bool contact;
  final bool disabled;

  SettingsListItem({
    this.header,
    this.subheader,
    this.icon,
    this.contactName,
    this.contactAddress,
    this.onPressed,
    this.disabled = false,
    this.contact = false,
  });

  _SettingsListItemState createState() => _SettingsListItemState();
}

class _SettingsListItemState extends State<SettingsListItem> {
  @override
  Widget build(BuildContext context) {
    return  Column(
      children: <Widget>[
        Container(
          width: double.maxFinite,
          height: 70,
          child: FlatButton(
            padding: EdgeInsetsDirectional.only(start: 24, end: 24),
            onPressed: () {
              if (widget.onPressed != null && !widget.disabled) {
                widget.onPressed();
              }
              return;
            },
            splashColor: widget.disabled ? Colors.transparent : StateContainer.of(context).curTheme.primary30,
            highlightColor: widget.disabled ? Colors.transparent : StateContainer.of(context).curTheme.primary15,
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0)),
            child: widget.contact
                ? Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      Container(
                        width: MediaQuery.of(context).size.width / 2,
                        child: AutoSizeText.rich(
                          TextSpan(children: [
                            TextSpan(
                              text: " ",
                              style: AppStyles.iconFontPrimarySmall(context),
                            ),
                            TextSpan(
                              text: widget.contactName,
                              style: AppStyles.contactsItemName(context),
                            ),
                          ]),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          style: TextStyle(fontSize: 14),
                        ),
                      ),
                      Container(
                        width: MediaQuery.of(context).size.width / 2 - 80,
                        alignment: Alignment(1, 0),
                        child: AutoSizeText(
                          widget.contactAddress,
                          style: AppStyles.contactsItemAddress(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                        ),
                      ),
                    ],
                  )
                : Row(
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      Container(
                        child: Icon(widget.icon,
                            size: 24,
                            color: widget.disabled ? StateContainer.of(context).curTheme.primary60 : StateContainer.of(context).curTheme.primary),
                      ),
                      Container(
                        margin: EdgeInsetsDirectional.only(start: 16),
                        child: Column(
                          mainAxisAlignment: MainAxisAlignment.center,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            Container(
                              width: MediaQuery.of(context).size.width - 130,
                              child: AutoSizeText(
                                widget.header,
                                style: widget.disabled ? AppStyles.settingsItemHeaderDisabled(context) : AppStyles.settingsItemHeader(context),
                                maxLines: 1,
                                stepGranularity: 0.1,
                              ),
                            ),
                            widget.subheader == null
                                ? SizedBox()
                                : Container(
                                    width: MediaQuery.of(context).size.width - 130,
                                    child: AutoSizeText(
                                      widget.subheader,
                                      style:
                                          widget.disabled ? AppStyles.settingsItemSubHeaderDisabled(context) : AppStyles.settingsItemSubHeader(context),
                                      maxLines: 1,
                                      stepGranularity: 0.1,
                                    ),
                                  ),
                          ],
                        ),
                      ),
                    ],
                  ),
          ),
        ),
        Container(
          width: double.maxFinite,
          height: 1,
          color: StateContainer.of(context)
              .curTheme
              .textDark10,
        ),
      ]
    );
  }
}


<|start_filename|>lib/ui/account/other_operations/change_name/change_name_sheet.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/account/other_operations/change_name/changing_name_sheet.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/formatters.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/error_container.dart';
import 'package:blaise_wallet_flutter/ui/widgets/fee_container.dart';
import 'package:blaise_wallet_flutter/ui/widgets/sheets.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:pascaldart/pascaldart.dart';

class ChangeNameSheet extends StatefulWidget {
  final PascalAccount account;

  ChangeNameSheet({@required this.account});

  _ChangeNameSheetState createState() => _ChangeNameSheetState();
}

class _ChangeNameSheetState extends State<ChangeNameSheet> {
  FocusNode _nameFocus;
  TextEditingController _nameController;
  String _nameError;

  // Fee
  bool _hasFee;

  @override
  void initState() {
    super.initState();
    this._nameFocus = FocusNode();
    this._nameController = TextEditingController();
    this._hasFee = walletState.shouldHaveFee();
  }

  @override
  Widget build(BuildContext context) {
    return TapOutsideUnfocus(
        child: Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  height: 60,
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient:
                        StateContainer.of(context).curTheme.gradientPrimary,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      // Close Button
                      Container(
                        margin: EdgeInsetsDirectional.only(start: 5, end: 10),
                        height: 50,
                        width: 50,
                        child: FlatButton(
                            highlightColor:
                                StateContainer.of(context).curTheme.textLight15,
                            splashColor:
                                StateContainer.of(context).curTheme.textLight30,
                            onPressed: () {
                              Navigator.of(context).pop();
                            },
                            shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(50.0)),
                            padding: EdgeInsets.all(0.0),
                            child: Icon(AppIcons.close,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textLight,
                                size: 20)),
                      ),
                      // Header
                      Container(
                        width: MediaQuery.of(context).size.width - 130,
                        alignment: Alignment(0, 0),
                        child: AutoSizeText(
                          toUppercase(AppLocalization.of(context)
                              .changeNameSheetHeader
                              ,context),
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          textAlign: TextAlign.center,
                        ),
                      ),
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      // Paragraph
                      Container(
                        width: double.maxFinite,
                        margin: EdgeInsetsDirectional.fromSTEB(30, 40, 30, 20),
                        child: AutoSizeText(
                          AppLocalization.of(context).changeNameParagraph,
                          style: AppStyles.paragraph(context),
                          stepGranularity: 0.1,
                          maxLines: 3,
                          minFontSize: 8,
                        ),
                      ),
                      Expanded(
                        child: KeyboardAvoider(
                          duration: Duration(milliseconds: 0),
                          autoScroll: true,
                          focusPadding: 40,
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: <Widget>[
                              // Container for the name text field
                              Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 10, 30, 0),
                                child: AppTextField(
                                  label: AppLocalization.of(context)
                                      .newAccountNameTextFieldHeader,
                                  style: AppStyles.paragraphMedium(context),
                                  maxLines: 1,
                                  controller: _nameController,
                                  focusNode: _nameFocus,
                                  inputFormatters: [
                                    WhitelistingTextInputFormatter(RegExp(
                                        r'[0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()\-+{}[\]_:"|<>,\.\?\/~]')),
                                    PascalNameFormatter()
                                  ],
                                  onChanged: (nt) {
                                    if (_nameError != null) {
                                      setState(() {
                                        _nameError = null;
                                      });
                                    }
                                  },
                                ),
                              ),
                              // Fee container
                              _hasFee
                                  ? FeeContainer(
                                      feeText:
                                          walletState.MIN_FEE.toStringOpt())
                                  : SizedBox(),
                              // Error Text
                              ErrorContainer(
                                errorText: _nameError == null ? "" : _nameError,
                              ),
                              // Bottom Margin
                              SizedBox(height: 24),
                            ],
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
                // "Change Name" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.Primary,
                      text: AppLocalization.of(context).changeNameButton,
                      onPressed: () {
                        validateAndChangeName();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    ));
  }

  void validateAndChangeName() {
    try {
      if (_nameController.text.isNotEmpty && _nameController.text.length < 3) {
        setState(() {
          _nameError = AppLocalization.of(context).threeCharacterNameError;
        });
        return;
      }
      AccountName accountName = AccountName(_nameController.text);
      AppSheets.showBottomSheet(
          context: context,
          widget: ChangingNameSheet(
              account: widget.account,
              newName: accountName,
              fee: _hasFee ? walletState.MIN_FEE : walletState.NO_FEE),
          noBlur: true);
    } catch (e) {
      setState(() {
        _nameError = AppLocalization.of(context).invalidAccountNameError;
      });
    }
  }
}


<|start_filename|>lib/ui/account/receive/receive_sheet.dart<|end_filename|>
import 'dart:async';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/account/receive/request_sheet.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/sheets.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:qr/qr.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:quiver/strings.dart';

class ReceiveSheet extends StatefulWidget {
  final String accountName;
  final AccountNumber accountNumber;
  ReceiveSheet({this.accountName, this.accountNumber});

  _ReceiveSheetState createState() => _ReceiveSheetState();
}

class _ReceiveSheetState extends State<ReceiveSheet> {
  bool _addressCopied;
  Timer _addressCopiedTimer;

  @override
  void initState() {
    super.initState();
    _addressCopied = false;
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisSize: MainAxisSize.min,
      children: <Widget>[
        Container(
          decoration: BoxDecoration(
            color: StateContainer.of(context).curTheme.backgroundPrimary,
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(12),
              topRight: Radius.circular(12),
            ),
          ),
          child: Column(
            children: <Widget>[
              // Sheet header
              Container(
                height: 60,
                width: double.maxFinite,
                decoration: BoxDecoration(
                  gradient: StateContainer.of(context).curTheme.gradientPrimary,
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(12),
                    topRight: Radius.circular(12),
                  ),
                ),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: <Widget>[
                    SizedBox(width: 65, height: 50),
                    // Header
                    Container(
                      width: MediaQuery.of(context).size.width - 130,
                      alignment: Alignment(0, 0),
                      child: Column(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: <Widget>[
                          Container(
                            child: isEmpty(widget.accountName)
                                ? SizedBox()
                                : Container(
                                    margin: EdgeInsets.only(bottom: 2),
                                    width:
                                        MediaQuery.of(context).size.width - 130,
                                    child: AutoSizeText(
                                      widget.accountName,
                                      style: AppStyles.accountCardName(context),
                                      maxLines: 1,
                                      stepGranularity: 0.1,
                                      minFontSize: 8,
                                      textAlign: TextAlign.center,
                                    ),
                                  ),
                          ),
                          Container(
                            width: MediaQuery.of(context).size.width - 130,
                            child: AutoSizeText(
                              widget.accountNumber.toString(),
                              style: AppStyles.accountCardAddress(context),
                              maxLines: 1,
                              stepGranularity: 0.1,
                              minFontSize: 8,
                              textAlign: TextAlign.center,
                            ),
                          ),
                        ],
                      ),
                    ),
                    // Share Button is removed for beta
                    /*Container(
                      margin: EdgeInsetsDirectional.only(start: 10, end: 5),
                      height: 50,
                      width: 50,
                      child: FlatButton(
                          highlightColor:
                              StateContainer.of(context).curTheme.textLight15,
                          splashColor:
                              StateContainer.of(context).curTheme.textLight30,
                          onPressed: () {
                            return null;
                          },
                          shape: RoundedRectangleBorder(
                              borderRadius: BorderRadius.circular(50.0)),
                          padding: EdgeInsets.all(0.0),
                          child: Icon(AppIcons.shareaddress,
                              color:
                                  StateContainer.of(context).curTheme.textLight,
                              size: 22)),
                    ),*/
                    SizedBox(width: 65, height: 50),
                  ],
                ),
              ),
              // QR Code
              Container(
                margin: EdgeInsetsDirectional.only(top: 30, bottom: 10),
                child: Stack(
                  alignment: Alignment(0, 0),
                  children: <Widget>[
                    // Gradient
                    Container(
                      width: 180,
                      height: 180,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(12),
                        gradient:
                            StateContainer.of(context).curTheme.gradientPrimary,
                      ),
                    ),
                    // White overlay
                    Container(
                      width: 172,
                      height: 172,
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(8),
                          color: Colors.white),
                    ),
                    // QR Code
                    QrImage(
                      data: widget.accountNumber.toString(),
                      size: 180.0,
                      errorCorrectionLevel: QrErrorCorrectLevel.Q,
                      version: 4,
                      gapless: false,
                    ),
                    // Logo background
                    Container(
                      width: 58,
                      height: 58,
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(16),
                          color: Colors.white),
                    ),
                    // Logo
                    Container(
                      width: 48,
                      height: 48,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(12),
                        gradient:
                            StateContainer.of(context).curTheme.gradientPrimary,
                      ),
                      child: Icon(AppIcons.pascalsymbol,
                          color: StateContainer.of(context)
                              .curTheme
                              .backgroundPrimary,
                          size: 30),
                    ),
                  ],
                ),
              ),
              //"Copy Address" and "Request Amount" buttons
              Row(
                children: <Widget>[
                  AppButton(
                    type: _addressCopied
                        ? AppButtonType.Success
                        : AppButtonType.Primary,
                    text: _addressCopied
                        ? AppLocalization.of(context).copiedAddressButton
                        : AppLocalization.of(context).copyAddressButton,
                    onPressed: () {
                      Clipboard.setData(
                          ClipboardData(text: widget.accountNumber.toString()));
                      setState(() {
                        _addressCopied = true;
                      });
                      if (_addressCopiedTimer != null) {
                        _addressCopiedTimer.cancel();
                      }
                      _addressCopiedTimer =
                          Timer(const Duration(milliseconds: 1500), () {
                        if (mounted) {
                          setState(() {
                            _addressCopied = false;
                          });
                        }
                      });
                    },
                  ),
                ],
              ),
              // "Request" button
              /*Row(
                children: <Widget>[
                  AppButton(
                    type: AppButtonType.PrimaryOutline,
                    text: AppLocalization.of(context).requestButton,
                    onPressed: () {
                        Navigator.of(context).pop();
                        AppSheets.showBottomSheet(
                            context: context,
                            widget: RequestSheet(address: widget.accountNumber.toString()));
                      },
                  ),
                ],
              ),*/
            ],
          ),
        ),
      ],
    );
  }
}


<|start_filename|>lib/network/model/request/getborrowed_request.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'getborrowed_request.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

GetBorrowedRequest _$GetBorrowedRequestFromJson(Map<String, dynamic> json) {
  return GetBorrowedRequest(
    action: json['action'] as String,
    b58pubkey: json['b58_pubkey'] as String,
  );
}

Map<String, dynamic> _$GetBorrowedRequestToJson(GetBorrowedRequest instance) =>
    <String, dynamic>{
      'action': instance.action,
      'b58_pubkey': instance.b58pubkey,
    };


<|start_filename|>test/signing/operations/buyaccount_operation_test.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/common.dart';
import 'package:pascaldart/crypto.dart';
import 'package:pascaldart/signing.dart';
import 'package:pascaldart/src/common/model/accountnumber.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('signing.operations.BuyAccountOperation', () {
    Map<String, dynamic> fixture;

    setUp(() {
      fixture = {
        'signerPublicKey':
            '<KEY>',
        'buyerAccount': 1430880,
        'accountToBuy': 1440500,
        'price': 0.0001,
        'fee': 0.0002,
        'payload': 'techworker',
        'seller': 1440500,
        'n_operation': 4004,
        'r': '3B3FF1BA82E8923F6FA8B92B10FEA291CC73E563D4CB92E58039F3D25DB98FA1',
        's': '7449069D5E034AD0B3419532B11530B52E3EBDBBBB1E754CDEADB6E709291B6B',
        'raw':
            '010000000600000060D51500A40F0000F4FA1500000000000000000002000000000000000A0074656368776F726B6572000000000000020100000000000000F4FA150000000000000020003B3FF1BA82E8923F6FA8B92B10FEA291CC73E563D4CB92E58039F3D25DB98FA120007449069D5E034AD0B3419532B11530B52E3EBDBBBB1E754CDEADB6E709291B6B'
      };
    });

    test('can be decode a signed operation', () {
      BuyAccountOperation decoded =
          RawOperationCoder.decodeFromBytes(PDUtil.hexToBytes(fixture['raw']));

      expect(PDUtil.byteToHex(PDUtil.encodeBigInt(decoded.signature.r)),
          fixture['r']);
      expect(PDUtil.byteToHex(PDUtil.encodeBigInt(decoded.signature.s)),
          fixture['s']);
      expect(decoded.sender.account, fixture['buyerAccount']);
      expect(decoded.target.account, fixture['accountToBuy']);
      expect(decoded.seller.account, fixture['seller']);
      expect(decoded.price.toStringOpt(), fixture['price'].toString());
      expect(decoded.amount.toStringOpt(), '0');
      expect(decoded.fee.toStringOpt(), fixture['fee'].toString());
      expect(decoded.nOperation, fixture['n_operation']);
      expect(PDUtil.bytesToUtf8String(decoded.payload), fixture['payload']);
    });
    test('can be decode signed operation and encode it again', () {
      BuyAccountOperation decoded =
          RawOperationCoder.decodeFromBytes(PDUtil.hexToBytes(fixture['raw']));

      expect(PDUtil.byteToHex(RawOperationCoder.encodeToBytes(decoded)),
          fixture['raw']);
    });
    test('can be built by hand', () {
      BuyAccountOperation op = BuyAccountOperation(
          sender: AccountNumber.fromInt(fixture['buyerAccount']),
          target: AccountNumber.fromInt(fixture['accountToBuy']),
          seller: AccountNumber.fromInt(fixture['seller']),
          price: Currency(fixture['price'].toString()))
        ..withNOperation(fixture['n_operation'])
        ..withPayload(PDUtil.stringToBytesUtf8(fixture['payload']))
        ..withFee(Currency(fixture['fee'].toString()))
        ..withSignature(Signature(
            r: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['r'])),
            s: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['s']))));

      Uint8List encoded = RawOperationCoder.encodeToBytes(op);

      expect(PDUtil.byteToHex(encoded), fixture['raw']);
    });
    test('can be built by hand and signed', () {
      PrivateKey pk = PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(
          '<KEY>'));
      BuyAccountOperation op = BuyAccountOperation(
          sender: AccountNumber.fromInt(fixture['buyerAccount']),
          target: AccountNumber.fromInt(fixture['accountToBuy']),
          seller: AccountNumber.fromInt(fixture['seller']),
          price: Currency(fixture['price'].toString()))
        ..withNOperation(fixture['n_operation'])
        ..withPayload(PDUtil.stringToBytesUtf8(fixture['payload']))
        ..withFee(Currency(fixture['fee'].toString()))
        ..sign(pk);

      expect(op.signature.r.toString().length > 30, true);
      expect(op.signature.s.toString().length > 30, true);
    });
  });
}


<|start_filename|>lib/ui/util/app_icons.dart<|end_filename|>
/// Flutter icons AppIcons
/// Copyright (C) 2019 by original authors @ fluttericon.com, fontello.com
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
///
/// To use this font, place it in your fonts/ directory and include the
/// following in your pubspec.yaml
///
/// flutter:
///   fonts:
///    - family:  AppIcons
///      fonts:
///       - asset: fonts/AppIcons.ttf
///
/// 
///
import 'package:flutter/widgets.dart';

class AppIcons {
  AppIcons._();

  static const _kFontFam = 'AppIcons';

  static const IconData addcontact = const IconData(0xe800, fontFamily: _kFontFam);
  static const IconData back = const IconData(0xe801, fontFamily: _kFontFam);
  static const IconData backupprivatekey = const IconData(0xe802, fontFamily: _kFontFam);
  static const IconData close = const IconData(0xe803, fontFamily: _kFontFam);
  static const IconData contacts = const IconData(0xe804, fontFamily: _kFontFam);
  static const IconData currency = const IconData(0xe805, fontFamily: _kFontFam);
  static const IconData currencyswitch = const IconData(0xe806, fontFamily: _kFontFam);
  static const IconData downarrow = const IconData(0xe807, fontFamily: _kFontFam);
  static const IconData edit = const IconData(0xe808, fontFamily: _kFontFam);
  static const IconData export_icon = const IconData(0xe809, fontFamily: _kFontFam);
  static const IconData fingerprint = const IconData(0xe80a, fontFamily: _kFontFam);
  static const IconData hide = const IconData(0xe80b, fontFamily: _kFontFam);
  static const IconData import_icon = const IconData(0xe80c, fontFamily: _kFontFam);
  static const IconData language = const IconData(0xe80d, fontFamily: _kFontFam);
  static const IconData lock = const IconData(0xe80e, fontFamily: _kFontFam);
  static const IconData support = const IconData(0xe80f, fontFamily: _kFontFam);
  static const IconData notifications = const IconData(0xe810, fontFamily: _kFontFam);
  static const IconData contact = const IconData(0xe811, fontFamily: _kFontFam);
  static const IconData pascalcurrency = const IconData(0xe812, fontFamily: _kFontFam);
  static const IconData paste = const IconData(0xe813, fontFamily: _kFontFam);
  static const IconData scan = const IconData(0xe814, fontFamily: _kFontFam);
  static const IconData search = const IconData(0xe815, fontFamily: _kFontFam);
  static const IconData security = const IconData(0xe816, fontFamily: _kFontFam);
  static const IconData settings = const IconData(0xe817, fontFamily: _kFontFam);
  static const IconData share = const IconData(0xe818, fontFamily: _kFontFam);
  static const IconData shareaddress = const IconData(0xe819, fontFamily: _kFontFam);
  static const IconData show = const IconData(0xe81a, fontFamily: _kFontFam);
  static const IconData theme = const IconData(0xe81b, fontFamily: _kFontFam);
  static const IconData tick = const IconData(0xe81c, fontFamily: _kFontFam);
  static const IconData timer = const IconData(0xe81d, fontFamily: _kFontFam);
  static const IconData trashcan = const IconData(0xe81e, fontFamily: _kFontFam);
  static const IconData uparrow = const IconData(0xe81f, fontFamily: _kFontFam);
  static const IconData changedaemon = const IconData(0xe820, fontFamily: _kFontFam);
  static const IconData pascalsymbol = const IconData(0xe821, fontFamily: _kFontFam);
  static const IconData chatbubble = const IconData(0xe822, fontFamily: _kFontFam);
  static const IconData max = const IconData(0xe823, fontFamily: _kFontFam);
  static const IconData logout = const IconData(0xe824, fontFamily: _kFontFam);
}


<|start_filename|>lib/store/account/account.dart<|end_filename|>
import 'dart:convert';
import 'dart:typed_data';

import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/bus/update_history_event.dart';
import 'package:blaise_wallet_flutter/constants.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:event_taxi/event_taxi.dart';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:mobx/mobx.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:logger/logger.dart';

part 'account.g.dart';

class Account = AccountBase with _$Account;

/// State for a specific account
abstract class AccountBase with Store {
  Logger log = sl.get<Logger>();

  @observable
  bool operationsLoading = true;

  @observable
  RPCClient rpcClient;

  @observable
  PascalAccount account;

  @observable
  Currency accountBalance;

  @observable
  List<PascalOperation> operations;

  @observable
  List<PascalOperation> operationsToDisplay;

  @observable
  bool paid;

  AccountBase({@required this.rpcClient, @required this.account}) {
    this.accountBalance = account.balance;
    this.paid = false;
  }

  @action
  void decrementBalance(Currency delta) {
    this.account.balance -= delta;
    this.accountBalance -= delta;
  }

  @action
  void incrementBalance(Currency delta) {
    this.account.balance += delta;
    this.accountBalance += delta;
  }

 @action
  Future<RPCResponse> jRpcRequest(Map<String, dynamic> request) async {
    /// This custom request includes borrowed accounts
    request['id'] = this.rpcClient.id;
    String responseJson = await this.rpcClient.rpcPost(request);
    if (responseJson == null) {
      throw Exception('Did not receive a response');
    }
    // Parse base response
    BaseResponse resp = BaseResponse.fromJson(json.decode(responseJson));
    // Determine if error response
    if (resp is Map &&
        resp.result.containsKey('code') &&
        resp.result.containsKey('message')) {
      return ErrorResponse.fromJson(resp.result);
    }
    // Determine correct response type
    if (resp.result.containsKey('paid')) {
      this.paid = resp.result['paid'];
      resp.result.remove('paid');
    }
    return PascalAccount.fromJson(resp.result);
  }

  @action
  Future<bool> updateAccount() async {
    // Update account information via getaccount, return false is unsuccessful true otherwise
    bool hasCustomDaemon = (await sl.get<SharedPrefsUtil>().getRpcUrl()) != AppConstants.DEFAULT_RPC_HTTP_URL;
    GetAccountRequest request = GetAccountRequest(account: this.account.account.account);
    Map<String, dynamic> requestJson = request.toJson();
    if (!hasCustomDaemon && account.isBorrowed) {
      requestJson['params'].putIfAbsent('borrowed', () => true);
    }
    RPCResponse resp = await this.jRpcRequest(requestJson);
    if (resp.isError) {
      return false;
    }
    PascalAccount updatedAccount = resp;
    // See if this accounts borrowed status has changed
    if (this.account.isBorrowed) {
      String curAcctPubkey = PublicKeyCoder().encodeToBase58(updatedAccount.encPubkey);
      String curWalletPubkey = PublicKeyCoder().encodeToBase58(walletState.publicKey);
      if (curAcctPubkey != curWalletPubkey) {
        updatedAccount.isBorrowed = true;
      }
    }
    this.account = updatedAccount;
    this.accountBalance = updatedAccount.balance;
    return true;
  }

  @action
  void addNewOperation(PascalOperation op) {
    /// Add operation if:
    /// 1) We don't have it
    /// 2) We do have it, but it has since been confirmed
    /// 3) This account is not borrowed
    if (this.operations == null) {
      return;
    }
    if (!this.operations.contains(op) || this.operations.contains(op) && this.operations.firstWhere((nOp) => nOp == op).maturation == null && op.maturation != null) {
      if (this.operations.contains(op)) {
        this.operations.remove(op);
      }
      this.operations.insert(0, op);
      // Re-sort this list
      // Remove pendings
      List<PascalOperation> pendings = this.operations.where((op) => op.maturation == null).toList();
      this.operations.removeWhere((op) => op.maturation == null);
      // Sort by time
      this.operations.sort((a, b) => b.time.compareTo(a.time));
      this.operations.insertAll(0, pendings);
      // Update to display
      this.operationsToDisplay = getOperationsToDisplay();
      // Refresh total wallet balance
      EventTaxiImpl.singleton().fire(UpdateHistoryEvent());
    }
  }

  @action
  void diffAndSortOperations(List<PascalOperation> newOperationList) {
    // Get pendings
    List<PascalOperation> pendingOperations = newOperationList.where((op) => op.maturation == null).toList();
    // Remove pendings that have since been confirmed
    this.operations.removeWhere((op) => op.maturation == null && !pendingOperations.contains(op));
    // Add all operations not already in the list and not pending
    this.operations.addAll(newOperationList.where((op) => (!this.operations.contains(op)) && op.maturation != null));
    // Sort by time
    this.operations.sort((a, b) => b.time.compareTo(a.time));
    // Add all pendings
    this.operations.removeWhere((op) => pendingOperations.contains(op));
    this.operations.insertAll(0, pendingOperations);
  }

  @action
  Future<void> getAccountOperations() async {
    GetAccountOperationsRequest request =
        GetAccountOperationsRequest(account: account.account.account,
                                    start: -1);
    RPCResponse resp = await this.rpcClient.makeRpcRequest(request);
    if (resp.isError) {
      ErrorResponse err = resp;
      log.e("getaccountoperations resulted in error ${err.errorMessage}");
      return null;
    }
    OperationsResponse opResp = resp;
    if (this.operations == null) {
      this.operations = opResp.operations;
      this.operationsToDisplay = getOperationsToDisplay();
    } else {
      // Diff and update operations
      this.diffAndSortOperations(opResp.operations);
      this.operationsToDisplay = getOperationsToDisplay();
      EventTaxiImpl.singleton().fire(UpdateHistoryEvent());
    }
    this.operationsLoading = false;
  }

  @action
  List<PascalOperation> getOperationsToDisplay() {
    return this.operations.where((op) => shouldDisplayOperation(op)).toList();
  }

  @action
  bool shouldDisplayOperation(PascalOperation op) {
    if (op.optype == OpType.TRANSACTION) {
      if (op.senders.length > 0 && op.receivers.length > 0 && op.senders[0].nOperation == 1 && op.receivers[0].receivingAccount == AccountNumber("1000")) {
        return false;
      }
      return true;
    } else if (op.optype == OpType.CHANGE_ACCOUNT_INFO) {
      if (op.changers.length > 0 && op.changers[0].newName != null) {
        return true;
      }
    } else if (op.optype == OpType.LIST_FORSALE) {
      if (op.changers.length >0 && op.changers[0].sellerAccount != null && op.changers[0].accountPrice != null) {
        return true;
      }
    } else if (op.optype == OpType.DELIST_FORSALE) {
      return true;
    }
    return false;
  }

  @action
  bool hasOperationsToDisplay() {
    if (this.operationsLoading || this.operations == null || this.operations.length == 0) {
      return false;
    }
    for (PascalOperation op in this.operations) {
      if (shouldDisplayOperation(op)) {
        return true;
      }
    }
    return false;
  }

  @action
  void changeAccountState(AccountState accountState) {
    this.account.state = accountState;
  }

  @action
  Future<RPCResponse> doSend({@required String amount, @required String destination, Currency fee, Uint8List encryptedPayload, String payload = ""}) async {
    fee = fee == null ? Currency('0') : fee;
    // Construct send
    TransactionOperation op = TransactionOperation(
      sender: this.account.account,
      target: AccountNumber(destination),
      amount: Currency(amount)
    )
    ..withNOperation(this.account.nOperation + 1)
    ..withPayload(encryptedPayload == null ? PDUtil.stringToBytesUtf8(payload) : encryptedPayload)
    ..withFee(fee)
    ..sign(PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(await sl.get<Vault>().getPrivateKey())));
    // Construct execute request
    ExecuteOperationsRequest request = ExecuteOperationsRequest(
      rawOperations: PDUtil.byteToHex(RawOperationCoder.encodeToBytes(op))
    );
    // Make request
    RPCResponse resp = await this.rpcClient.makeRpcRequest(request);
    if (resp.isError) {
      return resp;
    }
    OperationsResponse opResp = resp;
    if (opResp.operations[0].valid == null || opResp.operations[0].valid) {
      this.decrementBalance(Currency(amount));
      this.account.nOperation++;
      this.getAccountOperations();
    }
    return resp;
  }

  @action
  Future<RPCResponse> transferAccount(String strPubkey, {Currency fee}) async {
    PublicKey newPubkey;
    try {
      newPubkey = PublicKeyCoder().decodeFromBase58(strPubkey);
    } catch (e) {
      try {
        newPubkey = PublicKeyCoder().decodeFromBytes(PDUtil.hexToBytes(strPubkey));
      } catch (e) {
        throw Exception('Invalid Public key');
      }
    }
    fee = fee == null ? Currency('0') : fee;
    // Construct transfer
    ChangeKeyOperation op = ChangeKeyOperation(
      signer: account.account,
      newPublicKey: newPubkey
    )
    ..withNOperation(account.nOperation + 1)
    ..withPayload(PDUtil.stringToBytesUtf8(""))
    ..withFee(fee)
    ..sign(PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(await sl.get<Vault>().getPrivateKey())));
    // Construct execute request
    ExecuteOperationsRequest request = ExecuteOperationsRequest(
      rawOperations: PDUtil.byteToHex(RawOperationCoder.encodeToBytes(op))
    );
    // Make request
    RPCResponse resp = await this.rpcClient.makeRpcRequest(request);
    return resp;
  }

  @action
  Future<RPCResponse> changeAccountName(AccountName newName, {Currency fee}) async {
    fee = fee == null ? Currency('0') : fee;
    // Construct name change
    ChangeAccountInfoOperation op = ChangeAccountInfoOperation(
      accountSigner: account.account,
      targetSigner: account.account,
      newName: newName,
      withNewName: true
    )
    ..withNOperation(account.nOperation + 1)
    ..withPayload(PDUtil.stringToBytesUtf8(""))
    ..withFee(fee)
    ..sign(PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(await sl.get<Vault>().getPrivateKey())));
    // Construct execute request
    ExecuteOperationsRequest request = ExecuteOperationsRequest(
      rawOperations: PDUtil.byteToHex(RawOperationCoder.encodeToBytes(op))
    );
    // Make request
    RPCResponse resp = await this.rpcClient.makeRpcRequest(request);
    if (resp.isError) {
      return resp;
    }
    OperationsResponse opResp = resp;
    if (opResp.operations[0].valid == null || opResp.operations[0].valid) {
      this.account.nOperation++;
      this.getAccountOperations();
    }
    return resp;
  }

  @action
  Future<RPCResponse> listAccountForSale(Currency price, AccountNumber accountToPay, {PublicKey newPubKey, Currency fee}) async {
    fee = fee == null ? Currency('0') : fee;
    // Construct list for sale
    ListForSaleOperation op = ListForSaleOperation(
      accountSigner: account.account,
      targetSigner: account.account,
      price: price,
      accountToPay: accountToPay,
      newPublicKey: newPubKey
    )
    ..withNOperation(account.nOperation + 1)
    ..withPayload(PDUtil.stringToBytesUtf8(""))
    ..withFee(fee)
    ..sign(PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(await sl.get<Vault>().getPrivateKey())));
    // Execute request
    ExecuteOperationsRequest request = ExecuteOperationsRequest(
      rawOperations: PDUtil.byteToHex(RawOperationCoder.encodeToBytes(op))
    );
    // Make request
    RPCResponse resp = await this.rpcClient.makeRpcRequest(request);
    if (resp.isError) {
      return resp;
    }
    OperationsResponse opResp = resp;
    if (opResp.operations[0].valid == null || opResp.operations[0].valid) {
      this.account.nOperation++;
      this.getAccountOperations();
    }
    return resp;
  }

  @action
  Future<RPCResponse> delistAccountForSale({Currency fee}) async {
    fee = fee == null ? Currency('0') : fee;
    // Construct list for sale
    DeListForSaleOperation op = DeListForSaleOperation(
      accountSigner: account.account,
      targetSigner: account.account
    )
    ..withNOperation(account.nOperation + 1)
    ..withPayload(PDUtil.stringToBytesUtf8(""))
    ..withFee(fee)
    ..sign(PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(await sl.get<Vault>().getPrivateKey())));
    // Execute request
    ExecuteOperationsRequest request = ExecuteOperationsRequest(
      rawOperations: PDUtil.byteToHex(RawOperationCoder.encodeToBytes(op))
    );
    // Make request
    RPCResponse resp = await this.rpcClient.makeRpcRequest(request);
    if (resp.isError) {
      return resp;
    }
    OperationsResponse opResp = resp;
    if (opResp.operations[0].valid == null || opResp.operations[0].valid) {
      this.account.nOperation++;
      this.getAccountOperations();
    }
    return resp;
  }

  @action
  Future<Uint8List> encryptPayloadEcies(String payload, AccountNumber account) async {
    try {
      // Do getaccountrequest to get the public key of this account
      GetAccountRequest req = GetAccountRequest(
        account: account.account
      );
      // Execute request
      RPCResponse resp = await rpcClient.makeRpcRequest(req);
      if (resp.isError) {
        return null;
      }
      PascalAccount receiverAcct = resp;
      return EciesCrypt.encrypt(PDUtil.stringToBytesUtf8(payload), receiverAcct.encPubkey);
    } catch (e) {
      return null;
    }
  }
}



<|start_filename|>lib/network/model/response/getborrowed_response.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/response/borrow_response.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:pascaldart/pascaldart.dart';

part 'getborrowed_response.g.dart';

@JsonSerializable()
class GetBorrowedResponse {
  @JsonKey(name:'borrowed_account')
  BorrowResponse account;

  GetBorrowedResponse();

  factory GetBorrowedResponse.fromJson(Map<String, dynamic> json) => _$GetBorrowedResponseFromJson(json);
  Map<String, dynamic> toJson() => _$GetBorrowedResponseToJson(this);
}

<|start_filename|>lib/ui/widgets/error_container.dart<|end_filename|>
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';

class ErrorContainer extends StatelessWidget {
  final String errorText;
  ErrorContainer({@required this.errorText});

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment(-1, 0),
      margin: EdgeInsetsDirectional.only(start: 30, end: 30, top: 4, bottom: 0),
      child: Text(this.errorText,
          style: AppStyles.dangerSmallest600(context),
          textAlign: TextAlign.start),
    );
  }
}


<|start_filename|>lib/ui/widgets/placeholder_operation_list_item.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';

enum PlaceholderOperationType {
  Received,
  Sent,
  NameChanged,
  ListedForSale,
  Welcome
}

/// A widget for displaying a mnemonic phrase
class PlaceholderOperationListItem extends StatefulWidget {
  final PlaceholderOperationType type;

  PlaceholderOperationListItem({
    this.type,
  });

  _PlaceholderOperationListItemState createState() =>
      _PlaceholderOperationListItemState();
}

class _PlaceholderOperationListItemState
    extends State<PlaceholderOperationListItem> {
  @override
  Widget build(BuildContext context) {
    return Column(children: <Widget>[
      Container(
        width: double.maxFinite,
        height: widget.type == PlaceholderOperationType.Welcome ? null : 74,
        child: FlatButton(
          padding: EdgeInsetsDirectional.only(start: 24, end: 24),
          onPressed: () {
            return null;
          },
          splashColor: StateContainer.of(context).curTheme.primary30,
          highlightColor: StateContainer.of(context).curTheme.primary15,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0)),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: <Widget>[
              Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  // Operation Type
                  Container(
                    padding: EdgeInsetsDirectional.fromSTEB(8, 4, 8, 4),
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(100),
                        color: widget.type == PlaceholderOperationType.Received
                            ? StateContainer.of(context)
                                .curTheme
                                .primary
                                .withOpacity(0.75)
                            : widget.type == PlaceholderOperationType.Sent
                                ? StateContainer.of(context)
                                    .curTheme
                                    .textDark
                                    .withOpacity(0.75)
                                : StateContainer.of(context)
                                    .curTheme
                                    .secondary
                                    .withOpacity(0.75)),
                    child: AutoSizeText(
                      widget.type == PlaceholderOperationType.Received
                          ? "              "
                          : widget.type == PlaceholderOperationType.Sent
                              ? "       "
                              : widget.type ==
                                      PlaceholderOperationType.NameChanged
                                  ? "                  "
                                  : widget.type ==
                                          PlaceholderOperationType.ListedForSale
                                      ? "                      "
                                      : "           ",
                      style: AppStyles.operationType(context),
                    ),
                  ),
                  // Amount & Payload indicator or New Account Name
                  Container(
                    width: MediaQuery.of(context).size.width / 2 - 72,
                    margin: EdgeInsetsDirectional.only(top: 4),
                    child: widget.type == PlaceholderOperationType.Received ||
                            widget.type == PlaceholderOperationType.Sent ||
                            widget.type ==
                                PlaceholderOperationType.NameChanged ||
                            widget.type ==
                                PlaceholderOperationType.ListedForSale
                        ? Align(
                            alignment: Alignment(-1, 0),
                            child: Container(
                              decoration: BoxDecoration(
                                  color: widget.type ==
                                          PlaceholderOperationType.Received
                                      ? StateContainer.of(context)
                                          .curTheme
                                          .primary
                                          .withOpacity(0.5)
                                      : widget.type ==
                                              PlaceholderOperationType.Sent
                                          ? StateContainer.of(context)
                                              .curTheme
                                              .textDark
                                              .withOpacity(0.5)
                                          : StateContainer.of(context)
                                              .curTheme
                                              .secondary
                                              .withOpacity(0.5),
                                  borderRadius: BorderRadius.circular(100)),
                              child: AutoSizeText.rich(
                                TextSpan(
                                  children: [
                                    TextSpan(
                                        text: "  ",
                                        style: AppStyles
                                            .iconFontTextDarkBalanceSmallPascal(
                                                context)),
                                    TextSpan(
                                        text: " ",
                                        style: TextStyle(fontSize: 7)),
                                    TextSpan(
                                        text: "           ",
                                        style: widget.type ==
                                                PlaceholderOperationType
                                                    .Received
                                            ? AppStyles.balanceSmall(context)
                                            : widget.type ==
                                                    PlaceholderOperationType
                                                        .Sent
                                                ? AppStyles
                                                    .balanceSmallTextDark(
                                                        context)
                                                : AppStyles
                                                    .balanceSmallSecondary(
                                                        context)),
                                  ],
                                ),
                                textAlign: TextAlign.start,
                                maxLines: 1,
                                minFontSize: 4,
                                stepGranularity: 1,
                                style: TextStyle(
                                  fontSize: 14,
                                ),
                              ),
                            ),
                          )
                        : SizedBox(),
                  ),
                ],
              ),
              Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  widget.type == PlaceholderOperationType.Received ||
                          widget.type == PlaceholderOperationType.Sent
                      ?
                      // Address
                      Container(
                          width: MediaQuery.of(context).size.width / 2 - 72,
                          alignment: Alignment(1, 0),
                          child: Container(
                            decoration: BoxDecoration(
                              color: StateContainer.of(context)
                                  .curTheme
                                  .textDark
                                  .withOpacity(0.25),
                              borderRadius: BorderRadius.circular(100),
                            ),
                            child: AutoSizeText(
                              "          ",
                              style: AppStyles.contactsItemAddress(context),
                              maxLines: 1,
                              stepGranularity: 0.1,
                              textAlign: TextAlign.end,
                            ),
                          ))
                      : SizedBox(),
                  // Date
                  Container(
                    width: MediaQuery.of(context).size.width / 2 - 72,
                    margin: EdgeInsetsDirectional.only(top: 4),
                    alignment: Alignment(1, 0),
                    child: Container(
                      decoration: BoxDecoration(
                        color: StateContainer.of(context)
                            .curTheme
                            .textDark
                            .withOpacity(0.125),
                        borderRadius: BorderRadius.circular(100),
                      ),
                      child: AutoSizeText(
                        "                 ",
                        style: AppStyles.operationDate(context),
                        maxLines: 1,
                        stepGranularity: 0.1,
                        textAlign: TextAlign.end,
                      ),
                    ),
                  ),
                ],
              ),
            ],
          ),
        ),
      ),
      Container(
        width: double.maxFinite,
        height: 1,
        color: StateContainer.of(context).curTheme.textDark10,
      )
    ]);
  }
}


<|start_filename|>lib/ui/widgets/svg_repaint.dart<|end_filename|>
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class SvgRepaintAsset extends StatelessWidget {
  String asset;
  double width;
  double height;

  SvgRepaintAsset({this.asset, this.width, this.height});

  @override
  Widget build(BuildContext context) {
    return RepaintBoundary(
      child: SvgPicture.asset(asset, width: width, height: height,)
    );
  }
}

<|start_filename|>test/common/model/keys/PublicKey_test.dart<|end_filename|>
import 'package:pascaldart/common.dart';
import 'package:flutter_test/flutter_test.dart';

import '../../fixtures/publickey.dart';

void main() {
  group('common.model.keys.PublicKey', () {
    const List<int> curves = [
      Curve.CI_SECP256K1,
      Curve.CI_SECT283K1,
      Curve.CI_SECP521R1,
      Curve.CI_SECP384R1
    ];
    PublicKeyFixtures fixtures;
    PublicKeyCoder coder;

    setUp(() {
      coder = PublicKeyCoder();
      fixtures = PublicKeyFixtures();
    });

    test('can be created as an empty key (used by pasc v2)', () {
      PublicKey pubkey = PublicKey.empty();

      expect(pubkey.curve.id, 0);
      expect(pubkey.x.length, 0);
      expect(pubkey.y.length, 0);
    });

    test('cannot be created with wronfues managed by the curve', () {
      curves.forEach((c) {
        Curve curve = Curve(c);

        expect(
            () => {
                  PublicKey(
                      PDUtil.hexToBytes(
                          List.filled(curve.xylPublicKey() + 1, '00').join()),
                      PDUtil.hexToBytes(
                          List.filled(curve.xylPublicKey(), '00').join()),
                      curve)
                },
            throwsException);
        expect(
            () => {
                  PublicKey(
                      PDUtil.hexToBytes(
                          List.filled(curve.xylPublicKey(), '00').join()),
                      PDUtil.hexToBytes(
                          List.filled(curve.xylPublicKey() + 1, '00').join()),
                      curve)
                },
            throwsException);
      });
    });

    test('can return a value only containing x and y', () {
      fixtures.curve714.forEach((c) {
        PublicKey key =
            coder.decodeFromBytes(PDUtil.hexToBytes(c['enc_pubkey']));
        expect(PDUtil.byteToHex(key.ec()), c['x'] + c['y']);
      });
      fixtures.curve715.forEach((c) {
        PublicKey key =
            coder.decodeFromBytes(PDUtil.hexToBytes(c['enc_pubkey']));
        expect(PDUtil.byteToHex(key.ec()), c['x'] + c['y']);
      });
      fixtures.curve716.forEach((c) {
        PublicKey key =
            coder.decodeFromBytes(PDUtil.hexToBytes(c['enc_pubkey']));
        expect(PDUtil.byteToHex(key.ec()), c['x'] + c['y']);
      });
      fixtures.curve729.forEach((c) {
        PublicKey key =
            coder.decodeFromBytes(PDUtil.hexToBytes(c['enc_pubkey']));
        expect(PDUtil.byteToHex(key.ec()), c['x'] + c['y']);
      });
    });
  });
}


<|start_filename|>lib/network/model/response/getborrowed_response.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'getborrowed_response.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

GetBorrowedResponse _$GetBorrowedResponseFromJson(Map<String, dynamic> json) {
  return GetBorrowedResponse()
    ..account = json['borrowed_account'] == null
        ? null
        : BorrowResponse.fromJson(
            json['borrowed_account'] as Map<String, dynamic>);
}

Map<String, dynamic> _$GetBorrowedResponseToJson(
        GetBorrowedResponse instance) =>
    <String, dynamic>{
      'borrowed_account': instance.account,
    };


<|start_filename|>lib/network/model/response/price_response.dart<|end_filename|>
import 'package:json_annotation/json_annotation.dart';

part 'price_response.g.dart';

double _toDouble(v) {
  return double.tryParse(v.toString());
}

@JsonSerializable()
class PriceResponse {
  @JsonKey(name:'currency')
  String currency;

  @JsonKey(name:'price', fromJson:_toDouble)
  double price;

  @JsonKey(name:'btc', fromJson:_toDouble)
  double btcPrice;

  PriceResponse();

  factory PriceResponse.fromJson(Map<String, dynamic> json) => _$PriceResponseFromJson(json);
  Map<String, dynamic> toJson() => _$PriceResponseToJson(this);
}

<|start_filename|>lib/ui/util/margins.dart<|end_filename|>
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';

class AppMarginSizes {
  static const m0 = 0.0;
  static const m1 = 4.0;
  static const m2 = 16.0;
  static const m3 = 18.0;
  static const m4 = 24.0;
  static const m5 = 30.0;
  static const m6 = 40.0;
}

class AppMargins {
  // Text Field Header Margins
  static EdgeInsetsDirectional textFieldHeader(BuildContext context) {
    return UIUtil.smallScreen(context)
        ? EdgeInsetsDirectional.fromSTEB(AppMarginSizes.m5, AppMarginSizes.m2,
            AppMarginSizes.m5, AppMarginSizes.m0)
        : EdgeInsetsDirectional.fromSTEB(AppMarginSizes.m5, AppMarginSizes.m5,
            AppMarginSizes.m5, AppMarginSizes.m0);
  }
}


<|start_filename|>lib/ui/overview/public_key_overview_sheet.dart<|end_filename|>
import 'dart:async';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:qr/qr.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:quiver/strings.dart';

class PublicKeyOverviewSheet extends StatefulWidget {
  PublicKeyOverviewSheet();

  _PublicKeyOverviewSheetState createState() => _PublicKeyOverviewSheetState();
}

class _PublicKeyOverviewSheetState extends State<PublicKeyOverviewSheet> {
  bool _keyCopied;
  Timer _keyCopiedTimer;

  @override
  void initState() {
    super.initState();
    _keyCopied = false;
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisSize: MainAxisSize.min,
      children: <Widget>[
        Container(
          decoration: BoxDecoration(
            color: StateContainer.of(context).curTheme.backgroundPrimary,
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(12),
              topRight: Radius.circular(12),
            ),
          ),
          child: Column(
            children: <Widget>[
              // Sheet header
              Container(
                height: 60,
                width: double.maxFinite,
                decoration: BoxDecoration(
                  gradient: StateContainer.of(context).curTheme.gradientPrimary,
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(12),
                    topRight: Radius.circular(12),
                  ),
                ),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: <Widget>[
                    // Sized Box
                    SizedBox(
                      height: 50,
                      width: 65,
                    ),
                    // Header
                    Container(
                      width: MediaQuery.of(context).size.width - 130,
                      alignment: Alignment(0, 0),
                      child: AutoSizeText(
                        toUppercase(AppLocalization.of(context).publicKeySheetHeader, context),
                        style: AppStyles.header(context),
                        maxLines: 1,
                        stepGranularity: 0.1,
                        textAlign: TextAlign.center,
                      ),
                    ),
                    // Sized Box
                    SizedBox(
                      height: 50,
                      width: 65,
                    ),
                  ],
                ),
              ),
              // QR Code
              Container(
                margin: EdgeInsetsDirectional.only(top: 30, bottom: 10),
                child: Stack(
                  alignment: Alignment(0, 0),
                  children: <Widget>[
                    // Gradient
                    Container(
                      width: 198,
                      height: 198,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(12),
                        gradient:
                            StateContainer.of(context).curTheme.gradientPrimary,
                      ),
                    ),
                    // White overlay
                    Container(
                      width: 189,
                      height: 189,
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(8),
                          color: Colors.white),
                    ),
                    // QR Code
                    QrImage(
                      data: PublicKeyCoder()
                          .encodeToBase58(walletState.publicKey),
                      size: 198,
                      errorCorrectionLevel: QrErrorCorrectLevel.Q,
                      gapless: false,
                      version: 9,
                    ),
                    // Logo background
                    Container(
                      width: 64,
                      height: 64,
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(16),
                          color: Colors.white),
                    ),
                    // Logo
                    Container(
                      width: 53,
                      height: 53,
                      decoration: BoxDecoration(
                        borderRadius: BorderRadius.circular(12),
                        gradient:
                            StateContainer.of(context).curTheme.gradientPrimary,
                      ),
                      child: Icon(AppIcons.pascalsymbol,
                          color: StateContainer.of(context)
                              .curTheme
                              .backgroundPrimary,
                          size: 33),
                    ),
                  ],
                ),
              ),
              //"Copy Address" and "Request Amount" buttons
              Row(
                children: <Widget>[
                  AppButton(
                    type: _keyCopied
                        ? AppButtonType.Success
                        : AppButtonType.Primary,
                    text: _keyCopied
                        ? AppLocalization.of(context).keyCopiedButton
                        : AppLocalization.of(context).copyPublicKeyButton,
                    onPressed: () {
                      if (walletState.publicKey != null) {
                        Clipboard.setData(ClipboardData(
                            text: PublicKeyCoder()
                                .encodeToBase58(walletState.publicKey)));
                      }
                      setState(() {
                        _keyCopied = true;
                      });
                      if (_keyCopiedTimer != null) {
                        _keyCopiedTimer.cancel();
                      }
                      _keyCopiedTimer =
                          Timer(const Duration(milliseconds: 1500), () {
                        if (mounted) {
                          setState(() {
                            _keyCopied = false;
                          });
                        }
                      });
                    },
                  ),
                ],
              ),
              // "Request" button
              /*Row(
                children: <Widget>[
                  AppButton(
                    type: AppButtonType.PrimaryOutline,
                    text: AppLocalization.of(context).requestButton,
                    onPressed: () {
                        Navigator.of(context).pop();
                        AppSheets.showBottomSheet(
                            context: context,
                            widget: RequestSheet(address: widget.accountNumber.toString()));
                      },
                  ),
                ],
              ),*/
            ],
          ),
        ),
      ],
    );
  }
}


<|start_filename|>lib/ui/settings/change_daemon_sheet.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/constants.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/error_container.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:blaise_wallet_flutter/util/user_data_util.dart';
import 'package:flutter/material.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:validators/validators.dart';

class ChangeDaemonSheet extends StatefulWidget {
  final Function onChanged;

  ChangeDaemonSheet({this.onChanged}) : super();

  _ChangeDaemonSheetState createState() => _ChangeDaemonSheetState();
}

class _ChangeDaemonSheetState extends State<ChangeDaemonSheet> {
  FocusNode daemonFocusNode;
  TextEditingController daemonController;

  String daemonError;

  @override
  void initState() {
    super.initState();
    this.daemonFocusNode = FocusNode();
    this.daemonController = TextEditingController();
    sl.get<SharedPrefsUtil>().getRpcUrl().then((val) {
      if (mounted) {
        daemonController.text = val;
      }
    });
    this.daemonFocusNode.addListener(() {
      if (!this.daemonFocusNode.hasFocus) {
        if (isIP(daemonController.text)) {
          if (!daemonController.text.contains(":")) {
            daemonController.text = daemonController.text + ":4003";
          }
        }
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    return TapOutsideUnfocus(
        child: Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  height: 60,
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient:
                        StateContainer.of(context).curTheme.gradientPrimary,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      // Close Button
                      Container(
                        margin: EdgeInsetsDirectional.only(start: 5, end: 10),
                        height: 50,
                        width: 50,
                        child: FlatButton(
                            highlightColor:
                                StateContainer.of(context).curTheme.textLight15,
                            splashColor:
                                StateContainer.of(context).curTheme.textLight30,
                            onPressed: () {
                              Navigator.of(context).pop();
                            },
                            shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(50.0)),
                            padding: EdgeInsets.all(0.0),
                            child: Icon(AppIcons.close,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textLight,
                                size: 20)),
                      ),
                      // Header
                      Container(
                        width: MediaQuery.of(context).size.width - 130,
                        alignment: Alignment(0, 0),
                        child: AutoSizeText(
                          toUppercase(AppLocalization.of(context)
                              .changeDaemonSheetHeader
                              ,context),
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          textAlign: TextAlign.center,
                        ),
                      ),
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      // Paragraph
                      Container(
                        width: double.maxFinite,
                        margin: EdgeInsetsDirectional.fromSTEB(30, 40, 30, 20),
                        child: AutoSizeText(
                          AppLocalization.of(context).changeDaemonParagraph,
                          style: AppStyles.paragraph(context),
                          stepGranularity: 0.1,
                          maxLines: 3,
                          minFontSize: 8,
                        ),
                      ),
                      Expanded(
                        child: KeyboardAvoider(
                          duration: Duration(milliseconds: 0),
                          autoScroll: true,
                          focusPadding: 40,
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: <Widget>[
                              // Container for the name text field
                              Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 10, 30, 0),
                                child: AppTextField(
                                  label: AppLocalization.of(context)
                                      .addressTextFieldHeader,
                                  style: AppStyles.paragraphMedium(context),
                                  maxLines: 1,
                                  firstButton: TextFieldButton(
                                    icon: AppIcons.paste,
                                    onPressed: () async {
                                      String text =
                                          await UserDataUtil.getClipboardText(
                                              DataType.URL);
                                      if (text != null) {
                                        daemonController.text = text;
                                      }
                                    },
                                  ),
                                  controller: daemonController,
                                  focusNode: daemonFocusNode,
                                  onChanged: () {
                                    if (daemonError != null) {
                                      setState(() {
                                        daemonError = null;
                                      });
                                    }
                                  },
                                ),
                              ),
                              // Error Container
                              ErrorContainer(
                                errorText: daemonError ?? "",
                              ),
                              // Container for the "Set to Default" button
                              Row(
                                children: <Widget>[
                                  Container(
                                    decoration: BoxDecoration(
                                      borderRadius:
                                          BorderRadius.circular(100.0),
                                      color: StateContainer.of(context)
                                          .curTheme
                                          .backgroundPrimary,
                                      boxShadow: [
                                        StateContainer.of(context)
                                            .curTheme
                                            .shadowTextDark,
                                      ],
                                    ),
                                    margin: EdgeInsetsDirectional.fromSTEB(
                                        30, 30, 30, 40),
                                    height: 40,
                                    child: FlatButton(
                                      shape: RoundedRectangleBorder(
                                          borderRadius:
                                              BorderRadius.circular(100.0)),
                                      child: AutoSizeText(
                                        AppLocalization.of(context)
                                            .setToDefaultButton,
                                        textAlign: TextAlign.center,
                                        maxLines: 1,
                                        stepGranularity: 0.1,
                                        style: AppStyles.buttonMiniBg(context),
                                      ),
                                      onPressed: () {
                                        daemonFocusNode.unfocus();
                                        daemonController.text =
                                            AppConstants.DEFAULT_RPC_HTTP_URL;
                                      },
                                    ),
                                  ),
                                ],
                              ),
                            ],
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
                // "CHANGE DAEMON" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.Primary,
                      text: toUppercase(AppLocalization.of(context)
                          .changeDaemonButton
                          ,context),
                      onPressed: () async {
                        if (validateFormData()) {
                          String daemon = daemonController.text;
                          if (daemon == AppConstants.DEFAULT_RPC_HTTP_URL) {
                            await sl.get<SharedPrefsUtil>().resetRpcUrl();
                          } else {
                            await sl.get<SharedPrefsUtil>().setRpcUrl(daemon);
                          }
                          walletState.changeRpcUrl(daemon);
                          if (widget.onChanged != null) {
                            widget.onChanged(daemon);
                          }
                          UIUtil.showSnackbar(
                              AppLocalization.of(context)
                                  .urlChangedToParagraph
                                  .replaceAll("%1", daemon),
                              context);
                          Navigator.of(context).pop();
                        }
                      },
                      buttonTop: true,
                    ),
                  ],
                ),
                // "CANCEL" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.PrimaryOutline,
                      text: toUppercase(AppLocalization.of(context)
                          .cancelButton
                          ,context),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    ));
  }

  bool validateFormData() {
    if (!isIP(daemonController.text) && !isURL(daemonController.text)) {
      setState(() {
        daemonError = AppLocalization.of(context).invalidAddressError;
      });
      return false;
    }
    return true;
  }
}


<|start_filename|>test/common/coding/pascal/accountnumber_coder_test.dart<|end_filename|>
import 'package:pascaldart/common.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('common.coding.pascal.AccountNumberCoder', () {
    AccountNumberCoder coder;
    setUp(() {
      coder = AccountNumberCoder();
    });
    test('can decode a pascalcoin account number', () {
      expect(
          coder.decodeFromBytes(PDUtil.hexToBytes('EAFA1500')) is AccountNumber,
          true);
      expect(coder.decodeFromBytes(PDUtil.hexToBytes('EAFA1500')).toString(),
          '1440490-43');
    });
    test('can encode a pascalcoin account number', () {
      expect(
          PDUtil.byteToHex(coder.encodeToBytes(AccountNumber.fromInt(1440490))),
          'EAFA1500');
    });
  });
}


<|start_filename|>test/signing/operations/changeaccountinfo_operation_test.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/common.dart';
import 'package:pascaldart/crypto.dart';
import 'package:pascaldart/signing.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('signing.operations.ChangeAccountInfoOperation', () {
    Map<String, dynamic> fixture;

    setUp(() {
      fixture = {
        'signerPublicKey':
            '<KEY>',
        'signer': 1440500,
        'target': 1440503,
        'newPublicKey':
            '<KEY>',
        'newName': 'techworker123',
        'newType': '345',
        'n_operation': 4003,
        'fee': 0.0002,
        'payload': 'techworker',
        'r': '28D54FB4B87C8DEA5884876FA6DDD30115B1EAECEA50869181CC05D788C74D6A',
        's': '61E719DCEE48E93B94BC0938D1CADDBCB7E59F259097C622C98E5D0C758BB5AC',
        'raw':
            '0100000008000000F4FA1500F7FA1500A30F000002000000000000000A0074656368776F726B657200000000000007CA0220003078FA6B1419BD6F4D4F6A779358EBFA6BC12F3CE32E47A8D9F7CD5FA8956FF0200053A101778813DD24B90A5198BAE5EB9F8AA5EDFD30E4C130A69FDD62CAE774F90D0074656368776F726B65723132335901200028D54FB4B87C8DEA5884876FA6DDD30115B1EAECEA50869181CC05D788C74D6A200061E719DCEE48E93B94BC0938D1CADDBCB7E59F259097C622C98E5D0C758BB5AC'
      };
    });

    test('can be decode a signed operation', () {
      ChangeAccountInfoOperation decoded =
          RawOperationCoder.decodeFromBytes(PDUtil.hexToBytes(fixture['raw']));

      expect(PDUtil.byteToHex(PDUtil.encodeBigInt(decoded.signature.r)),
          fixture['r']);
      expect(PDUtil.byteToHex(PDUtil.encodeBigInt(decoded.signature.s)),
          fixture['s']);
      expect(decoded.accountSigner.account, fixture['signer']);
      expect(decoded.targetSigner.account, fixture['target']);
      expect(decoded.nOperation, fixture['n_operation']);
      expect(decoded.fee.toStringOpt(), fixture['fee'].toString());
      expect(decoded.changeType & 1, 1);
      expect(decoded.changeType & 2, 2);
      expect(decoded.changeType & 4, 4);
      expect(PDUtil.bytesToUtf8String(decoded.payload), fixture['payload']);
      expect(decoded.newName.toString(), fixture['newName']);
      expect(decoded.newType.toString(), fixture['newType']);
      expect(PublicKeyCoder().encodeToBase58(decoded.newPublicKey),
          fixture['newPublicKey']);
    });

    test('can be decode signed operation and encode it again', () {
      ChangeAccountInfoOperation decoded =
          RawOperationCoder.decodeFromBytes(PDUtil.hexToBytes(fixture['raw']));

      expect(PDUtil.byteToHex(RawOperationCoder.encodeToBytes(decoded)),
          fixture['raw']);
    });

    test('can be build by hand', () {
      ChangeAccountInfoOperation op = ChangeAccountInfoOperation(
          accountSigner: AccountNumber.fromInt(fixture['signer']),
          targetSigner: AccountNumber.fromInt(fixture['target']))
        ..withNOperation(fixture['n_operation'])
        ..withPayload(PDUtil.stringToBytesUtf8(fixture['payload']))
        ..withFee(Currency(fixture['fee'].toString()))
        ..setNewName(AccountName(fixture['newName']))
        ..setNewType(int.parse(fixture['newType']))
        ..setNewPublickey(
            PublicKeyCoder().decodeFromBase58(fixture['newPublicKey']))
        ..withSignature(Signature(
            r: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['r'])),
            s: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['s']))));

      Uint8List encoded = RawOperationCoder.encodeToBytes(op);

      expect(PDUtil.byteToHex(encoded), fixture['raw']);
    });
    test('can be built by hand and signed', () {
      PrivateKey pk = PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(
          '<KEY>'));
      ChangeAccountInfoOperation op = ChangeAccountInfoOperation(
          accountSigner: AccountNumber.fromInt(fixture['signer']),
          targetSigner: AccountNumber.fromInt(fixture['target']))
        ..withNOperation(fixture['n_operation'])
        ..withPayload(PDUtil.stringToBytesUtf8(fixture['payload']))
        ..withFee(Currency(fixture['fee'].toString()))
        ..setNewName(AccountName(fixture['newName']))
        ..setNewType(int.parse(fixture['newType']))
        ..setNewPublickey(
            PublicKeyCoder().decodeFromBase58(fixture['newPublicKey']))
        ..sign(pk);

      expect(op.signature.r.toString().length > 30, true);
      expect(op.signature.s.toString().length > 30, true);
    });
    test('can compute digest correctly', () {
      ChangeAccountInfoOperation op = ChangeAccountInfoOperation(
        accountSigner: AccountNumber.fromInt(1440500),
        targetSigner: AccountNumber.fromInt(1440500),
        newName: AccountName('bbedward'),
        withNewName: true
      )
      ..withNOperation(20)
      ..withPayload(PDUtil.stringToBytesUtf8(""))
      ..withFee(Currency("0"))
        ..withSignature(Signature(
            r: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['r'])),
            s: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['s']))));
        expect(PDUtil.byteToHex(op.digest()), 'F4FA1500F4FA150014000000000000000000000000000000000000000200000000000008006262656477617264000008');
    });
  });
}


<|start_filename|>lib/model/db/appdb.dart<|end_filename|>
import 'dart:async';
import 'dart:io' as io;
import 'package:flutter/foundation.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';
import 'package:path_provider/path_provider.dart';
import 'package:blaise_wallet_flutter/model/db/contact.dart';

class DBHelper{
  static const int DB_VERSION = 1;
  static const String CONTACTS_SQL =
    """CREATE TABLE Contacts( 
        id INTEGER PRIMARY KEY AUTOINCREMENT, 
        name TEXT, 
        account INTEGER, 
        payload TEXT)""";

  static Database _db;

  Future<Database> get db async {
    if(_db != null)
      return _db;
    _db = await initDb();
    return _db;
  }

  initDb() async {
    io.Directory documentsDirectory = await getApplicationDocumentsDirectory();
    String path = join(documentsDirectory.path, "blaise.db");
    var theDb = await openDatabase(path, version: DB_VERSION, onCreate: _onCreate, onUpgrade: _onUpgrade);
    return theDb;
  }

  void _onCreate(Database db, int version) async {
    // When creating the db, create the tables
    await db.execute(CONTACTS_SQL);
  }

  void _onUpgrade(Database db, int oldVersion, int newVersion) async {
    return;
  }

  // Contacts
  Future<List<Contact>> getContacts() async {
    var dbClient = await db;
    List<Map> list = await dbClient.rawQuery('SELECT * FROM Contacts ORDER BY name');
    List<Contact> contacts = new List();
    for (int i = 0; i < list.length; i++) {
      contacts.add(new Contact(id: list[i]["id"], name: list[i]["name"], account: AccountNumber.fromInt(list[i]["account"]), payload: list[i]["payload"]));
    }
    return contacts;
  }

  Future<List<Contact>> getContactsWithNameLike(String pattern) async {
    var dbClient = await db;
    List<Map> list = await dbClient.rawQuery('SELECT * FROM Contacts WHERE name LIKE \'%$pattern%\' ORDER BY LOWER(name)');
    List<Contact> contacts = new List();
    for (int i = 0; i < list.length; i++) {
      contacts.add(new Contact(id: list[i]["id"], name: list[i]["name"], account: AccountNumber.fromInt(list[i]["account"]), payload: list[i]["payload"]));
    }
    return contacts;
  }

  Future<Contact> getContactWithAccount(AccountNumber account) async {
    var dbClient = await db;
    List<Map> list = await dbClient.rawQuery('SELECT * FROM Contacts WHERE account = ?', [account.account]);
    if (list.length > 0) {
      return Contact(id: list[0]["id"], name: list[0]["name"], account: AccountNumber.fromInt(list[0]["account"]), payload: list[0]["payload"]);
    }
    return null;
  }

  Future<Contact> getContactWithName(String name) async {
    var dbClient = await db;
    List<Map> list = await dbClient.rawQuery('SELECT * FROM Contacts WHERE name = ?', [name]);
    if (list.length > 0) {
      return Contact(id: list[0]["id"], name: list[0]["name"], account: AccountNumber.fromInt(list[0]["account"]), payload: list[0]["payload"]);
    }
    return null;
  }

  Future<bool> contactExistsWithName(String name) async {
    var dbClient = await db;
    int count = Sqflite.firstIntValue(await dbClient.rawQuery('SELECT count(*) FROM Contacts WHERE lower(name) = ?', [name.toLowerCase()]));
    return count > 0;
  }

  Future<bool> contactExistsWithAccount(AccountNumber account) async {
    var dbClient = await db;
    int count = Sqflite.firstIntValue(await dbClient.rawQuery('SELECT count(*) FROM Contacts WHERE account = ?', [account.account]));
    return count > 0;
  }

  Future<int> saveContact(Contact contact) async {
    var dbClient = await db;
    return await dbClient.rawInsert('INSERT INTO Contacts (name, account, payload) values(?, ?, ?)', [contact.name, contact.account.account, contact.payload]);
  }

  Future<int> saveContacts(List<Contact> contacts) async {
    int count = 0;
    for (Contact c in contacts) {
      if (await saveContact(c) > 0) {
        count++;
      }
    }
    return count;
  }

  Future<bool> deleteContact(Contact contact) async {
    var dbClient = await db;
    return await dbClient.rawDelete("DELETE FROM Contacts WHERE account = ?", [contact.account.account]) > 0;
  }
}

<|start_filename|>test/json_rpc/model/request/getblockoperation_request_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.getblockoperation.test', () {
    test('can serialize getblockoperation', () {
      GetBlockOperationRequest opsRequest =
          GetBlockOperationRequest(block: 1234);
      expect(json.encode(opsRequest.toJson()),
          '{"jsonrpc":"2.0","method":"getblockoperation","id":0,"params":{"block":1234,"opblock":0}}');
    });
  });
}


<|start_filename|>lib/ui/intro/intro_decrypt_and_import_private_key.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/util/routes.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/overlay_dialog.dart';
import 'package:blaise_wallet_flutter/ui/widgets/pin_screen.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:pascaldart/pascaldart.dart';

class IntroDecryptAndImportPrivateKeyPage extends StatefulWidget {
  final String encryptedKey;

  IntroDecryptAndImportPrivateKeyPage({@required this.encryptedKey});

  @override
  _IntroDecryptAndImportPrivateKeyPageState createState() =>
      _IntroDecryptAndImportPrivateKeyPageState();
}

class _IntroDecryptAndImportPrivateKeyPageState
    extends State<IntroDecryptAndImportPrivateKeyPage> {
  FocusNode _passwordFocusNode;
  TextEditingController _passwordController;
  String _passwordError;

  @override
  void initState() {
    super.initState();
    _passwordFocusNode = FocusNode();
    _passwordController = TextEditingController();
  }

  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
        resizeToAvoidBottomPadding: false,
        backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
        body: TapOutsideUnfocus(
            child: LayoutBuilder(
          builder: (context, constraints) => Column(
            children: <Widget>[
              //A widget that holds welcome animation + paragraph
              Expanded(
                  child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  // Container for the header
                  Container(
                    padding: EdgeInsetsDirectional.only(
                      top: (MediaQuery.of(context).padding.top) +
                          (24 - (MediaQuery.of(context).padding.top) / 2),
                    ),
                    decoration: BoxDecoration(
                      gradient:
                          StateContainer.of(context).curTheme.gradientPrimary,
                    ),
                    // Row for back button and the header
                    child: Row(
                      children: <Widget>[
                        // The header
                        Container(
                          width: MediaQuery.of(context).size.width - 60,
                          margin:
                              EdgeInsetsDirectional.fromSTEB(30, 24, 30, 24),
                          child: AutoSizeText(
                            AppLocalization.of(context)
                                .decryptAndImportKeyHeader,
                            style: AppStyles.header(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                          ),
                        ),
                      ],
                    ),
                  ),
                  //Container for the paragraph
                  Container(
                    margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 20),
                    alignment: Alignment(-1, 0),
                    child: AutoSizeText(
                      AppLocalization.of(context)
                          .looksLikeEncryptedKeyParagraph,
                      maxLines: 3,
                      stepGranularity: 0.1,
                      style: AppStyles.paragraph(context),
                    ),
                  ),
                  Expanded(
                    child: KeyboardAvoider(
                      duration: Duration(milliseconds: 0),
                      autoScroll: true,
                      focusPadding: 40,
                      child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: <Widget>[
                          // Container for the text field
                          Container(
                              margin:
                                  EdgeInsetsDirectional.fromSTEB(30, 10, 30, 0),
                              child: AppTextField(
                                label: AppLocalization.of(context)
                                    .passwordTextFieldHeader,
                                style: AppStyles.privateKeyPrimary(context),
                                passwordField: true,
                                focusNode: _passwordFocusNode,
                                controller: _passwordController,
                                onChanged: onPasswordChanged,
                                maxLines: 1,
                              )),
                          // Error Text
                          Container(
                            margin: EdgeInsetsDirectional.only(
                                start: 30, end: 30, top: 4, bottom: 40),
                            child: Text(
                              _passwordError == null ? "" : _passwordError,
                              style: AppStyles.paragraphPrimary(context),
                              textAlign: TextAlign.start,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ],
              )),
              //"Import" and "Go Back" buttons
              Row(
                children: <Widget>[
                  AppButton(
                    type: AppButtonType.Primary,
                    text: AppLocalization.of(context).importButton,
                    buttonTop: true,
                    onPressed: () {
                      decryptAndSubmit();
                    },
                  ),
                ],
              ),
              // "Go Back" button
              Row(
                children: <Widget>[
                  AppButton(
                    type: AppButtonType.PrimaryOutline,
                    text: AppLocalization.of(context).goBackButton,
                    onPressed: () {
                      Navigator.of(context).pop();
                    },
                  ),
                ],
              ),
            ],
          ),
        )));
  }

  void onPasswordChanged(String newText) {
    setState(() {
      _passwordError = null;
    });
  }

  void decryptAndSubmit() {
    if (_passwordController.text.length < 1) {
      setState(() {
        _passwordError = AppLocalization.of(context).emptyPasswordError;
      });
      return;
    }
    PrivateKey privKey;
    try {
      privKey = PrivateKeyCrypt.decrypt(
          PDUtil.hexToBytes(widget.encryptedKey), _passwordController.text);
    } catch (e) {
      setState(() {
        _passwordError = AppLocalization.of(context).invalidPasswordError;
      });
      return;
    }
    if (!privKey.curve.supported) {
      showAppDialog(
          context: context,
          builder: (_) => DialogOverlay(
                title: AppLocalization.of(context).keyTypeNotSupportedHeader,
                confirmButtonText: toUppercase(AppLocalization.of(context).okayGoBackButton, context),
                feeDialog: true,
                body: TextSpan(
                  children: [
                    TextSpan(
                      text:
                          AppLocalization.of(context).keyTypeNotSupportedParagraph,
                      style: AppStyles.paragraph(context),
                    )
                  ],
                ),
                onConfirm: () {
                  Navigator.of(context)
                      .popUntil(RouteUtils.withNameLike('/intro_welcome'));
                },
              ));
      return;
    }
    sl.get<Vault>().setPrivateKey(privKey).then((_) {
      sl.get<SharedPrefsUtil>().setPrivateKeyBackedUp(true).then((_) {
        Navigator.of(context)
            .push(MaterialPageRoute(builder: (BuildContext context) {
          return PinScreen(
              type: PinOverlayType.NEW_PIN,
              onSuccess: (pin) {
                sl.get<Vault>().setPin(pin).then((_) {
                  walletState.requestUpdate();
                  Navigator.of(context).pushNamedAndRemoveUntil(
                      '/overview', (Route<dynamic> route) => false);
                });
              });
        }));
      });
    });
  }
}


<|start_filename|>lib/ui/widgets/fee_container.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';

class FeeContainer extends StatelessWidget {
  final String feeText;
  FeeContainer({@required this.feeText});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsetsDirectional.fromSTEB(30, 4, 30, 0),
      alignment: Alignment(-1, 0),
      child: AutoSizeText.rich(
        TextSpan(children: [
          TextSpan(
            text: AppLocalization.of(context).feeColonHeader + " ",
            style: AppStyles.primarySmall600(context),
          ),
          TextSpan(
            text: "",
            style: AppStyles.iconFontPrimaryBalanceSmallPascal(context),
          ),
          TextSpan(text: " ", style: TextStyle(fontSize: 6)),
          TextSpan(
              text: this.feeText, style: AppStyles.primarySmall600(context)),
        ]),
      ),
    );
  }
}


<|start_filename|>test/json_rpc/model/pascal_account_test.dart<|end_filename|>
import 'package:pascaldart/common.dart';
import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.pascal_account', () {
    test('can serialize getaccount response', () {
      Map<String, dynamic> rawResponse = {
        "jsonrpc": "2.0",
        "id": 123,
        "result": {
          "account": 1920,
          "enc_pubkey":
              "CA0220009D92DFA1D6F8B2CAE31194EE5433EE4AD457AE145C1C67E49A9196EE58A45B9F200046EAF20C0A26A80A7693E71C0222313A0187AFCA838209FF86FB740A4FFF7F0B",
          "balance": 29595.952,
          "n_operation": 0,
          "updated_b": 11973
        }
      };
      BaseResponse baseResp = BaseResponse.fromJson(rawResponse);
      expect(baseResp.jsonrpc, "2.0");
      expect(baseResp.id, 123);
      PascalAccount getAcctResp = PascalAccount.fromJson(baseResp.result);
      expect(getAcctResp.account.account, 1920);
      expect(
          PDUtil.byteToHex(
              PublicKeyCoder().encodeToBytes(getAcctResp.encPubkey)),
          'CA0220009D92DFA1D6F8B2CAE31194EE5433EE4AD457AE145C1C67E49A9196EE58A45B9F200046EAF20C0A26A80A7693E71C0222313A0187AFCA838209FF86FB740A4FFF7F0B');
      expect(getAcctResp.balance.toStringOpt(), '29595.952');
      expect(getAcctResp.nOperation, 0);
      expect(getAcctResp.updatedBlock, 11973);
    });
  });
}


<|start_filename|>test/json_rpc/model/request/getblock_request_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.GetBlockRequest', () {
    test('can serialize GetBlockRequest', () {
      GetBlockRequest blockRequest = GetBlockRequest(block: 1234);
      expect(json.encode(blockRequest.toJson()),
          '{"jsonrpc":"2.0","method":"getblock","id":0,"params":{"block":1234}}');
    });
  });
}


<|start_filename|>lib/model/db/contact.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'contact.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

Contact _$ContactFromJson(Map<String, dynamic> json) {
  return Contact(
    name: json['name'] as String,
    account: intToAccountNum(json['account'] as int),
    payload: json['payload'] as String,
  );
}

Map<String, dynamic> _$ContactToJson(Contact instance) => <String, dynamic>{
      'name': instance.name,
      'account': accountNumToInt(instance.account),
      'payload': instance.payload,
    };


<|start_filename|>lib/network/model/response/subscribe_response.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'subscribe_response.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

SubscribeResponse _$SubscribeResponseFromJson(Map<String, dynamic> json) {
  return SubscribeResponse()
    ..uuid = json['uuid'] as String
    ..price = _toDouble(json['price'])
    ..btcPrice = _toDouble(json['btc'])
    ..borrowEligible = json['borrow_eligible'] as bool ?? false;
}

Map<String, dynamic> _$SubscribeResponseToJson(SubscribeResponse instance) =>
    <String, dynamic>{
      'uuid': instance.uuid,
      'price': instance.price,
      'btc': instance.btcPrice,
      'borrow_eligible': instance.borrowEligible,
    };


<|start_filename|>lib/ui/settings/backup_private_key/encrypt_private_key_sheet.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/settings/backup_private_key/encrypted_private_key_sheet.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/sheets.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:pascaldart/pascaldart.dart';

class EncryptPrivateKeySheet extends StatefulWidget {
  _EncryptPrivateKeySheetState createState() => _EncryptPrivateKeySheetState();
}

class _EncryptPrivateKeySheetState extends State<EncryptPrivateKeySheet> {
  FocusNode passwordFocusNode;
  TextEditingController passwordController;
  FocusNode confirmPasswordFocusNode;
  TextEditingController confirmPasswordController;

  String passwordError;

  bool passwordsMatch;

  @override
  void initState() {
    super.initState();
    this.passwordsMatch = false;
    this.passwordFocusNode = FocusNode();
    this.confirmPasswordFocusNode = FocusNode();
    this.passwordController = TextEditingController();
    this.confirmPasswordController = TextEditingController();
  }

  @override
  Widget build(BuildContext context) {
    return TapOutsideUnfocus(
        child: Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  height: 60,
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient:
                        StateContainer.of(context).curTheme.gradientPrimary,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      // Close Button
                      Container(
                        margin: EdgeInsetsDirectional.only(start: 5, end: 10),
                        height: 50,
                        width: 50,
                        child: FlatButton(
                            highlightColor:
                                StateContainer.of(context).curTheme.textLight15,
                            splashColor:
                                StateContainer.of(context).curTheme.textLight30,
                            onPressed: () {
                              Navigator.of(context).pop();
                            },
                            shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(50.0)),
                            padding: EdgeInsets.all(0.0),
                            child: Icon(AppIcons.close,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textLight,
                                size: 20)),
                      ),
                      // Header
                      Container(
                        width: MediaQuery.of(context).size.width - 130,
                        alignment: Alignment(0, 0),
                        child: AutoSizeText(
                          toUppercase(AppLocalization.of(context)
                              .encryptSheetHeader
                              ,context),
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          textAlign: TextAlign.center,
                        ),
                      ),
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      // Paragraph
                      Container(
                        width: double.maxFinite,
                        margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 20),
                        child: AutoSizeText(
                          AppLocalization.of(context).encryptKeyParagraph,
                          style: AppStyles.paragraph(context),
                          stepGranularity: 0.1,
                          maxLines: 3,
                          minFontSize: 8,
                        ),
                      ),
                      Expanded(
                        child: KeyboardAvoider(
                          duration: Duration(milliseconds: 0),
                          autoScroll: true,
                          focusPadding: 40,
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: <Widget>[
                              // Container for new password field
                              Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 10, 30, 0),
                                child: AppTextField(
                                  label: AppLocalization.of(context)
                                      .newPasswordTextFieldHeader,
                                  style: this.passwordsMatch ? AppStyles.paragraphMediumPrimary(context) : AppStyles.paragraphMedium(context),
                                  maxLines: 1,
                                  passwordField: true,
                                  focusNode: passwordFocusNode,
                                  controller: passwordController,
                                  onChanged: (String newText) {
                                    if (passwordError != null) {
                                      setState(() {
                                        passwordError = null;
                                      });
                                    }
                                    if (confirmPasswordController.text ==
                                        passwordController.text) {
                                      if (mounted) {
                                        setState(() {
                                          passwordsMatch = true;
                                        });
                                      }
                                    } else {
                                      if (mounted) {
                                        setState(() {
                                          passwordsMatch = false;
                                        });
                                      }
                                    }
                                  },
                                  textInputAction: TextInputAction.next,
                                  onSubmitted: (text) {
                                    confirmPasswordFocusNode.requestFocus();
                                  },
                                ),
                              ),
                              // Container for confirm password field
                              Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 30, 30, 40),
                                child: AppTextField(
                                  label: AppLocalization.of(context)
                                      .confirmPasswordTextFieldHeader,
                                  style: this.passwordsMatch ? AppStyles.paragraphMediumPrimary(context) : AppStyles.paragraphMedium(context),
                                  maxLines: 1,
                                  passwordField: true,
                                  focusNode: confirmPasswordFocusNode,
                                  controller: confirmPasswordController,
                                  onChanged: (String newText) {
                                    if (passwordError != null) {
                                      setState(() {
                                        passwordError = null;
                                      });
                                    }
                                    if (confirmPasswordController.text ==
                                        passwordController.text) {
                                      if (mounted) {
                                        setState(() {
                                          passwordsMatch = true;
                                        });
                                      }
                                    } else {
                                      if (mounted) {
                                        setState(() {
                                          passwordsMatch = false;
                                        });
                                      }
                                    }
                                  },
                                ),
                              ),
                              // Error text
                              Container(
                                margin: EdgeInsetsDirectional.only(
                                    start: 30, end: 30, top: 4, bottom: 40),
                                child: AutoSizeText(
                                  passwordError == null ? "" : passwordError,
                                  style: AppStyles.paragraphPrimary(context),
                                  textAlign: TextAlign.start,
                                ),
                              )
                            ],
                          ),
                        ),
                      ),
                    ],
                  ),
                ),
                // "Encrypt" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.Primary,
                      text: AppLocalization.of(context).encryptButton,
                      buttonTop: true,
                      onPressed: () {
                        validatePasswordMatchAndEncrypt();
                      },
                    ),
                  ],
                ),
                // "Close" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.PrimaryOutline,
                      text: AppLocalization.of(context).closeButton,
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        )
      ],
    ));
  }

  void validatePasswordMatchAndEncrypt() {
    if (passwordController.text != confirmPasswordController.text) {
      setState(() {
        passwordError = AppLocalization.of(context).noMatchPasswordError;
      });
    } else if (passwordController.text.isEmpty) {
      setState(() {
        passwordError = AppLocalization.of(context).emptyPasswordError;
      });
    } else {
      sl.get<Vault>().getPrivateKey().then((pkStr) {
        PrivateKey pk =
            PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(pkStr));
        String encrypted = PDUtil.byteToHex(
            PrivateKeyCrypt.encrypt(pk, passwordController.text));
        Navigator.of(context).pop();
        AppSheets.showBottomSheet(
            context: context,
            widget: EncryptedPrivateKeySheet(encryptedKey: encrypted));
      });
    }
  }
}


<|start_filename|>lib/bus/new_operation_event.dart<|end_filename|>
import 'package:event_taxi/event_taxi.dart';
import 'package:pascaldart/pascaldart.dart';

class NewOperationEvent implements Event {
  final PascalOperation operation;

  NewOperationEvent({this.operation});
}

<|start_filename|>lib/network/model/request/freepasa_get_request.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'freepasa_get_request.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

FreePASAGetRequest _$FreePASAGetRequestFromJson(Map<String, dynamic> json) {
  return FreePASAGetRequest(
    phoneIso: json['phone_iso'] as String,
    phoneNumber: json['phone_number'] as String,
    b58pubkey: json['b58_pubkey'] as String,
  )..action = json['action'] as String;
}

Map<String, dynamic> _$FreePASAGetRequestToJson(FreePASAGetRequest instance) =>
    <String, dynamic>{
      'action': instance.action,
      'phone_iso': instance.phoneIso,
      'phone_number': instance.phoneNumber,
      'b58_pubkey': instance.b58pubkey,
    };


<|start_filename|>lib/network/model/request/subscribe_request.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'subscribe_request.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

SubscribeRequest _$SubscribeRequestFromJson(Map<String, dynamic> json) {
  return SubscribeRequest(
    action: json['action'] as String,
    account: json['account'] as int,
    currency: json['currency'] as String,
    uuid: json['uuid'] as String,
    b58pubkey: json['b58_pubkey'] as String,
    fcmToken: json['fcm_token'] as String,
    notificationEnabled: json['notification_enabled'] as bool,
  );
}

Map<String, dynamic> _$SubscribeRequestToJson(SubscribeRequest instance) {
  final val = <String, dynamic>{
    'action': instance.action,
  };

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('account', instance.account);
  writeNotNull('currency', instance.currency);
  writeNotNull('uuid', instance.uuid);
  writeNotNull('b58_pubkey', instance.b58pubkey);
  writeNotNull('fcm_token', instance.fcmToken);
  writeNotNull('notification_enabled', instance.notificationEnabled);
  return val;
}


<|start_filename|>test/crypto/encrypt/pascal/kdf_test.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/common.dart';
import 'package:pascaldart/crypto.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('crypto.encrypt.pascal.KDF', () {
    test('generates key and iv without salt', () {
      KeyIV data = KDF.pascalCoin('test');
      expect(data.key is Uint8List, true);
      expect(data.iv is Uint8List, true);

      expect(data.key.length == 32, true);
      expect(data.iv.length == 16, true);
    });

    test('generates key and iv with salt', () {
      KeyIV data =
          KDF.pascalCoin('test', salt: PDUtil.stringToBytesUtf8('123456798'));
      expect(data.key is Uint8List, true);
      expect(data.iv is Uint8List, true);

      expect(data.key.length == 32, true);
      expect(data.iv.length == 16, true);
    });
  });
}


<|start_filename|>lib/network/model/request/borrow_request.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'borrow_request.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

BorrowRequest _$BorrowRequestFromJson(Map<String, dynamic> json) {
  return BorrowRequest(
    action: json['action'] as String,
    b58pubkey: json['b58_pubkey'] as String,
  );
}

Map<String, dynamic> _$BorrowRequestToJson(BorrowRequest instance) =>
    <String, dynamic>{
      'action': instance.action,
      'b58_pubkey': instance.b58pubkey,
    };


<|start_filename|>lib/network/model/request/borrow_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';

part 'borrow_request.g.dart';

@JsonSerializable()
class BorrowRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'b58_pubkey')
  String b58pubkey;

  BorrowRequest({this.action = "borrow_account", this.b58pubkey}) : super();

  factory BorrowRequest.fromJson(Map<String, dynamic> json) => _$BorrowRequestFromJson(json);
  Map<String, dynamic> toJson() => _$BorrowRequestToJson(this);
}

<|start_filename|>lib/network/model/request/freepasa_verify_request.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'freepasa_verify_request.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

FreePASAVerifyRequest _$FreePASAVerifyRequestFromJson(
    Map<String, dynamic> json) {
  return FreePASAVerifyRequest(
    requestId: json['request_id'] as String,
    code: json['code'] as String,
  )..action = json['action'] as String;
}

Map<String, dynamic> _$FreePASAVerifyRequestToJson(
        FreePASAVerifyRequest instance) =>
    <String, dynamic>{
      'action': instance.action,
      'request_id': instance.requestId,
      'code': instance.code,
    };


<|start_filename|>test/crypto/encrypt/pascal/ecies_crypt_test.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/common.dart';
import 'package:pascaldart/crypto.dart';
import 'package:flutter_test/flutter_test.dart';

import '../../fixtures/ecies.dart';

void main() {
  group('crypto.encrypt.pascal.EciesCrypt', () {
    test('can decrypt an PascalCoin payload', () {
      KeyPair keyPair = Keys.fromPrivateKey(PrivateKeyCrypt.decrypt(
          PDUtil.hexToBytes(
              '53616C7465645F5F1CD34699BAFAD73EAE8A574154F08760BF8E8B9A554CA9691819BA06962D4A3774B9ACADA4B75471A85A10B2C418A56B1AFFF8F560AC6F66'),
          'test123'));

      eciesTestData.forEach((d) {
        expect(
            PDUtil.bytesToUtf8String(EciesCrypt.decrypt(
                PDUtil.hexToBytes(d['encrypted']), keyPair.privateKey)),
            d['decrypted']);
      });
    });
    test('can encrypt and decrypt a value', () {
      KeyPair keyPair = Keys.fromPrivateKey(PrivateKeyCrypt.decrypt(
          PDUtil.hexToBytes(
              '53616C7465645F5F1CD34699BAFAD73EAE8A574154F08760BF8E8B9A554CA9691819BA06962D4A3774B9ACADA4B75471A85A10B2C418A56B1AFFF8F560AC6F66'),
          'test123'));

      Uint8List encrypted = EciesCrypt.encrypt(
          PDUtil.stringToBytesUtf8('test123'), keyPair.publicKey);
      expect(
          PDUtil.bytesToUtf8String(
              EciesCrypt.decrypt(encrypted, keyPair.privateKey)),
          'test123');
    });
    test('can will throw an error if decryption fails', () {
      KeyPair keyPair = Keys.fromPrivateKey(PrivateKeyCrypt.decrypt(
          PDUtil.hexToBytes(
              '53616C7465645F5F1CD34699BAFAD73EAE8A574154F08760BF8E8B9A554CA9691819BA06962D4A3774B9ACADA4B75471A85A10B2C418A56B1AFFF8F560AC6F66'),
          'test123'));

      expect(
          () => EciesCrypt.decrypt(
              PDUtil.stringToBytesUtf8('Hello'), keyPair.privateKey),
          throwsRangeError);
    });
  });
}


<|start_filename|>test/common/fixtures/operation_hash.dart<|end_filename|>
class OperationHashFixtures {
  List<Map<String, dynamic>> hashes;

  OperationHashFixtures() {
    hashes = [
      {
        "block": 145184,
        "account": 725390,
        "ophash":
            "203702008E110B0001000000CED0FF597661A01924931D1DD59AC782E7148C35",
        "n_operation": 1
      },
      {
        "block": 133249,
        "account": 318389,
        "ophash":
            "81080200B5DB040006000000AF4532D33332CF689358A29466B52B7AEB07ED93",
        "n_operation": 6
      },
      {
        "block": 97136,
        "account": 285630,
        "ophash":
            "707B0100BE5B04004BEB0A00FA8C64AE68E9C3EDACD37CC57AB5EE8610A34759",
        "n_operation": 715595
      },
      {
        "block": 112779,
        "account": 285630,
        "ophash":
            "8BB80100BE5B0400DDFD1100680B88CC8FF6D6B55E3B219622C23EDDB2940989",
        "n_operation": 1179101
      },
      {
        "block": 132437,
        "account": 661655,
        "ophash":
            "5505020097180A00010000001384388202AEBD17C94FFE2D9623B76D3C31A5FD",
        "n_operation": 1
      },
      {
        "block": 222078,
        "account": 1109845,
        "ophash":
            "7E63030055EF1000010000006DE6B899C400C124196E20A45C18E9080A637E6A",
        "n_operation": 1
      },
      {
        "block": 88803,
        "account": 285630,
        "ophash":
            "E35A0100BE5B0400155C0800A72B9C62D9C6331A8D535B25B5CD8D33365336C4",
        "n_operation": 547861
      },
      {
        "block": 194180,
        "account": 274656,
        "ophash":
            "84F60200E03004000B0000000B209F2233318B7A58F79C494D52D106A182C21C",
        "n_operation": 11
      },
      {
        "block": 71450,
        "account": 168573,
        "ophash":
            "1A1701007D92020083000000E5AE8191B66E542D3D531B48FBB09F608499D8E1",
        "n_operation": 131
      },
      {
        "block": 94190,
        "account": 285630,
        "ophash":
            "EE6F0100BE5B040000F909009F899DF6688380CBB19A95F49FABB067E1920EF1",
        "n_operation": 653568
      },
      {
        "block": 96263,
        "account": 285630,
        "ophash":
            "07780100BE5B040013A70A007AB02F4EAD46C8C2998D00F753DE2BFBBCF1435E",
        "n_operation": 698131
      },
      {
        "block": 170823,
        "account": 853585,
        "ophash":
            "479B020051060D000100000034541D38FD23A54CF3A15C29EE1A4A10DFE6B07D",
        "n_operation": 1
      },
      {
        "block": 252072,
        "account": 1259770,
        "ophash":
            "A8D80300FA38130001000000DA08B38FC8F811EC48784BBE7EFE97D40090460D",
        "n_operation": 1
      },
      {
        "block": 123430,
        "account": 86646,
        "ophash":
            "26E20100765201009206000010984FE6B1C3E6FAB370A696BA8A2CBCBF00C600",
        "n_operation": 1682
      },
      {
        "block": 52225,
        "account": 250000,
        "ophash":
            "01CC000090D00300060000008A9870CB2E5E5619A42FD1EC7A636C19C08063F1",
        "n_operation": 6
      },
      {
        "block": 99563,
        "account": 285630,
        "ophash":
            "EB840100BE5B04003FC20B00666AAA11EBF1CEB03E45B6BDA1653914220A2ED8",
        "n_operation": 770623
      },
      {
        "block": 141094,
        "account": 285630,
        "ophash":
            "26270200BE5B040030712400DCE7F78F488F48A9CA9BF20B20D490C7B05B246C",
        "n_operation": 2388272
      },
      {
        "block": 21520,
        "account": 106250,
        "ophash":
            "105400000A9F01000100000044538FB5969E4408F4FD4DB4EF364A05C32DF749",
        "n_operation": 1
      },
      {
        "block": 71723,
        "account": 290760,
        "ophash":
            "2B180100C86F0400647900009624C9123D8AD699D3541C24B9917E9B24634DA5",
        "n_operation": 31076
      },
      {
        "block": 197456,
        "account": 986755,
        "ophash":
            "50030300830E0F000100000046BFA7E2D38C33F9FCE2EDF40802566E9704AADE",
        "n_operation": 1
      },
      {
        "block": 281842,
        "account": 1408660,
        "ophash":
            "F24C0400947E1500010000003C13E0389D971B1A96093CDC6885BE73C2EEB928",
        "n_operation": 1
      },
      {
        "block": 171733,
        "account": 285630,
        "ophash":
            "D59E0200BE5B04008FF5340017C8C199677E96C72BC407E03962879EAE23CE32",
        "n_operation": 3470735
      },
      {
        "block": 65352,
        "account": 285630,
        "ophash":
            "48FF0000BE5B0400995E01004092B10D2FACED75757E4B7EC1D572672554FF4B",
        "n_operation": 89753
      },
      {
        "block": 107122,
        "account": 285630,
        "ophash":
            "72A20100BE5B0400E9E20E0030E01EB1863C85116880B6FB78ECF02CC8AB661A",
        "n_operation": 975593
      },
      {
        "block": 188221,
        "account": 571630,
        "ophash":
            "3DDF0200EEB80800DB16000076206AA5E8CE273243735E5125F5B9B8529BA389",
        "n_operation": 5851
      },
      {
        "block": 207716,
        "account": 571630,
        "ophash":
            "642B0300EEB80800FD270000870874F538EAF1955AC165D4E49A6CED2F80E4D8",
        "n_operation": 10237
      },
      {
        "block": 127859,
        "account": 86646,
        "ophash":
            "73F30100765201000E0700004A7B2F31D45DE9431CE3AF944B435B7DA2A457A7",
        "n_operation": 1806
      },
      {
        "block": 140580,
        "account": 453213,
        "ophash":
            "242502005DEA06000200000086D2657961CD22C31D1896115D5717E159A8F763",
        "n_operation": 2
      },
      {
        "block": 163390,
        "account": 647858,
        "ophash":
            "3E7E0200B2E20900050000003EFE45958DDADD8FAE6F2C7F22641516590749F5",
        "n_operation": 5
      },
      {
        "block": 162887,
        "account": 813900,
        "ophash":
            "477C02004C6B0C00010000003B8FFAA508950218CC49287A7F289C0CCA00FB28",
        "n_operation": 1
      },
      {
        "block": 250717,
        "account": 285630,
        "ophash":
            "5DD30300BE5B0400A9124B005A9B9B5CBE40DBBEB596EEC47F22B055E1908245",
        "n_operation": 4919977
      },
      {
        "block": 137307,
        "account": 686010,
        "ophash":
            "5B180200BA770A0001000000C4D4ADF655617BD5055A2B9B933D2608E8219621",
        "n_operation": 1
      },
      {
        "block": 76273,
        "account": 285630,
        "ophash":
            "F1290100BE5B0400ECBA0400BA72424704CE3E70263CB2A44EC74D6A8BD901AC",
        "n_operation": 309996
      },
      {
        "block": 124621,
        "account": 143351,
        "ophash":
            "CDE60100F72F020079040000C3061A7A8FFCC4A7602A32897BCCF2C945F79E3F",
        "n_operation": 1145
      },
      {
        "block": 169233,
        "account": 845605,
        "ophash":
            "1195020025E70C0001000000249A2E8BEFA352052D2FABDF6809169EE13B9708",
        "n_operation": 1
      },
      {
        "block": 90199,
        "account": 285630,
        "ophash":
            "57600100BE5B040033BD08004A73B040F5B59DEA48AB3AEAC082242425C1CEA1",
        "n_operation": 572723
      },
      {
        "block": 71448,
        "account": 285630,
        "ophash":
            "18170100BE5B0400522E03001F425F1357D8E7A920A4CE58FB95EA7613302BEA",
        "n_operation": 208466
      },
      {
        "block": 112431,
        "account": 561565,
        "ophash":
            "2FB701009D910800010000001C80B1D02CA82F311BF317301B853FA5401CFAB4",
        "n_operation": 1
      },
      {
        "block": 192382,
        "account": 961340,
        "ophash":
            "7EEF02003CAB0E00010000004EBBACA38A5C4D0B17F01D353CE218521816C7CC",
        "n_operation": 1
      },
      {
        "block": 70858,
        "account": 168537,
        "ophash":
            "CA140100599202001F0000004E8124E483506D7DEFF310B411E1B9429172F35C",
        "n_operation": 31
      },
      {
        "block": 261001,
        "account": 1301680,
        "ophash":
            "89FB0300B0DC130001000000405368C194DCCF9006574E0795021587BB69B6C5",
        "n_operation": 1
      },
      {
        "block": 174259,
        "account": 285630,
        "ophash":
            "B3A80200BE5B0400E673360022E36363D1D9EC9D7E79F098B5AA61D1B9B41CBA",
        "n_operation": 3568614
      },
      {
        "block": 279728,
        "account": 34500,
        "ophash":
            "B0440400C4860000AC1F0000A5FAC040AC20F75B12CB9CD4D470C88A3FD5D10E",
        "n_operation": 8108
      },
      {
        "block": 110956,
        "account": 285630,
        "ophash":
            "6CB10100BE5B0400ECF51000B13946F2DEE508C1D112E28F3A214C0995BBF3C0",
        "n_operation": 1111532
      },
      {
        "block": 293348,
        "account": 819598,
        "ophash":
            "E47904008E810C00100000007330C3F25C4C112E3AC83B5D57699E7D70DCC3B4",
        "n_operation": 16
      },
      {
        "block": 176329,
        "account": 831690,
        "ophash":
            "C9B00200CAB00C001D000000698A367C0D85BC0C66322E3186A0E8057C5DF1E3",
        "n_operation": 29
      },
      {
        "block": 76493,
        "account": 285630,
        "ophash":
            "CD2A0100BE5B0400E4CF040016A722271659174361ECF5AE358123CD2220A385",
        "n_operation": 315364
      },
      {
        "block": 228406,
        "account": 1141480,
        "ophash":
            "367C0300E86A1100010000005729291FB3BB227B53CD7084B4BF91409433950E",
        "n_operation": 1
      },
      {
        "block": 69298,
        "account": 279500,
        "ophash":
            "B20E0100CC4304000A00000098F8611727E6F27484BDC1DD8F4020F6B5194A20",
        "n_operation": 10
      },
      {
        "block": 192904,
        "account": 963960,
        "ophash":
            "88F1020078B50E0001000000383AC4DFF56ECEABCAF67A780D992F2182B2D315",
        "n_operation": 1
      },
      {
        "block": 202057,
        "account": 571630,
        "ophash":
            "49150300EEB8080000230000CBD006E8FA86F458189436813CD623F32AADBE42",
        "n_operation": 8960
      },
      {
        "block": 266435,
        "account": 1331640,
        "ophash":
            "C3100400B85114000100000017F9F0144F0C0C3F67757D71E52B8EBCD5D0DC90",
        "n_operation": 1
      },
      {
        "block": 290745,
        "account": 1452690,
        "ophash":
            "B96F0400922A160001000000E9B6EC1DCCDEFC21B70743B04F1A455A9F2E0FE2",
        "n_operation": 1
      },
      {
        "block": 239823,
        "account": 1198570,
        "ophash":
            "CFA80300EA49120001000000B1AFE26A2706ADE1B098AFD11FD5AA8A939EDE89",
        "n_operation": 1
      },
      {
        "block": 175828,
        "account": 571630,
        "ophash":
            "D4AE0200EEB808009E0F0000D4670156A28528537B82C6484093C2110645BECF",
        "n_operation": 3998
      },
      {
        "block": 293273,
        "account": 1465830,
        "ophash":
            "99790400E65D1600010000006743EFCDB2969DE044F13901CD6F774690399D61",
        "n_operation": 1
      },
      {
        "block": 221015,
        "account": 300124,
        "ophash":
            "575F03005C9404003E310000BCCD047E70495F38AFFF3ADE2B03B3DB280D72D4",
        "n_operation": 12606
      },
      {
        "block": 75191,
        "account": 143351,
        "ophash":
            "B7250100F72F0200210300007A4654F2ACBF25A0B0BDD9D3563249ED950D6534",
        "n_operation": 801
      },
      {
        "block": 178365,
        "account": 359614,
        "ophash":
            "BDB80200BE7C0500020000005A9E0C4AE386F20CB1D9FF7BBEF70059EA089DB7",
        "n_operation": 2
      },
      {
        "block": 60105,
        "account": 285630,
        "ophash":
            "C9EA0000BE5B0400707D0000CE14549A0A555F5CAA568954C8AABB1B62F01D5C",
        "n_operation": 32112
      },
      {
        "block": 92803,
        "account": 285630,
        "ophash":
            "836A0100BE5B0400A57C09004723A6DE0BE9E464CAC1ED03ECB62EAC29629FA8",
        "n_operation": 621733
      },
      {
        "block": 167332,
        "account": 86646,
        "ophash":
            "A48D020076520100CB0D00000B71CC945B2211856F7C24DB3E9521E480B35B3D",
        "n_operation": 3531
      },
      {
        "block": 164798,
        "account": 823475,
        "ophash":
            "BE830200B3900C0001000000533908EEE6DD2DF06D1D19ABDF53A43DFBDCC032",
        "n_operation": 1
      },
      {
        "block": 40562,
        "account": 52405,
        "ophash":
            "729E0000B5CC000006000000E092C485BDF8F0371127E1B1A83263E5973D3AE5",
        "n_operation": 6
      },
      {
        "block": 258397,
        "account": 1291395,
        "ophash":
            "5DF1030083B4130001000000F43F9D8C32899E6D9319330B377443038287506D",
        "n_operation": 1
      },
      {
        "block": 18928,
        "account": 84585,
        "ophash":
            "F0490000694A0100010000002B1F777DFCC789CE3E5962931A136D77A2638188",
        "n_operation": 1
      },
      {
        "block": 187784,
        "account": 86646,
        "ophash":
            "88DD02007652010014130000CCF929C4F624BB0EB1954896CC9888D50A651482",
        "n_operation": 4884
      },
      {
        "block": 194929,
        "account": 974080,
        "ophash":
            "71F9020000DD0E0001000000E18CA90D602A67DA3EA12C950D4C75ADB3312BFC",
        "n_operation": 1
      },
      {
        "block": 93775,
        "account": 285630,
        "ophash":
            "4F6E0100BE5B040077D5090098C3EC32642DAC2AD38DEA6F59372A4FB39ABA92",
        "n_operation": 644471
      },
      {
        "block": 81932,
        "account": 409125,
        "ophash":
            "0C400100253E0600010000003DEEF919CDF79DC6E04E7DEB485F38F1A5C9C28C",
        "n_operation": 1
      },
      {
        "block": 94239,
        "account": 470580,
        "ophash":
            "1F700100342E0700010000009DA71AACF49B09796515A8894B7186736BC167E9",
        "n_operation": 1
      },
      {
        "block": 170212,
        "account": 850485,
        "ophash":
            "E498020035FA0C000100000017CFD48AC92E6AC56D3F3EDFF8416F158D4E1E04",
        "n_operation": 1
      },
      {
        "block": 173527,
        "account": 867105,
        "ophash":
            "D7A50200213B0D00010000004D587A8A4BDFC1EE5A85B3EF7DEA48071D6664FC",
        "n_operation": 1
      },
      {
        "block": 201999,
        "account": 86646,
        "ophash":
            "0F1503007652010084140000A2D7CDDCD804E4C5B2DFF006CCBB89A8F8B20CAF",
        "n_operation": 5252
      },
      {
        "block": 90868,
        "account": 285630,
        "ophash":
            "F4620100BE5B04009AED0800C2C081A29CE007ACFA50F1FDF8102FE6E7A09FA5",
        "n_operation": 585114
      },
      {
        "block": 187134,
        "account": 285630,
        "ophash":
            "FEDA0200BE5B04000F9D3D0015A5206A69E0CF38E35FA76DB86926A796EBC282",
        "n_operation": 4037903
      },
      {
        "block": 204281,
        "account": 1020865,
        "ophash":
            "F91D0300C1930F00010000007966FFE3C3BA795376C7B29B20BE163F081A2C13",
        "n_operation": 1
      },
      {
        "block": 86627,
        "account": 285630,
        "ophash":
            "63520100BE5B040083C90700D78FD4E7560CE92BFB92563090846F82B5028E79",
        "n_operation": 510339
      },
      {
        "block": 132044,
        "account": 86646,
        "ophash":
            "CC0302007652010074070000EB8F75D8380598D9B28A87EED7DC1865CC6C2CD3",
        "n_operation": 1908
      },
      {
        "block": 111237,
        "account": 285630,
        "ophash":
            "85B20100BE5B04003E201100ACC1299E4C04EE40A6FE27543220DDDC0F61C52F",
        "n_operation": 1122366
      },
      {
        "block": 147226,
        "account": 86646,
        "ophash":
            "1A3F02007652010084080000DE63792BAC08167C024F62FCA2F311DE6217E83A",
        "n_operation": 2180
      },
      {
        "block": 108113,
        "account": 285630,
        "ophash":
            "51A60100BE5B0400146C0F00D823419DF299490824AB38CA108B05256B9078AA",
        "n_operation": 1010708
      },
      {
        "block": 244497,
        "account": 571630,
        "ophash":
            "11BB0300EEB80800D12F0000A811D71E5523E788C0448A2833F0323A2DD29ACB",
        "n_operation": 12241
      },
      {
        "block": 37919,
        "account": 53275,
        "ophash":
            "1F9400001BD0000003000000B223226C31C4193E3D5100FA8C3F65D24986E8F3",
        "n_operation": 3
      },
      {
        "block": 102163,
        "account": 86646,
        "ophash":
            "138F01007652010057030000879342A080B1F5EF084D7EDE8147A86CB468BC11",
        "n_operation": 855
      },
      {
        "block": 251822,
        "account": 1258555,
        "ophash":
            "AED703003B34130001000000FAA7CC0063FC040603AA6C2180ACDCCEDA26F6FE",
        "n_operation": 1
      },
      {
        "block": 86280,
        "account": 285630,
        "ophash":
            "08510100BE5B0400E5B00700C0F754B00A3CD4A85B4487E10DA9D5806451FAD7",
        "n_operation": 504037
      },
      {
        "block": 97499,
        "account": 285630,
        "ophash":
            "DB7C0100BE5B04003E0B0B004A681FB2BEDF5C6140DA518C3037DFE7F627DE9B",
        "n_operation": 723774
      },
      {
        "block": 160692,
        "account": 571630,
        "ophash":
            "B4730200EEB80800F8080000FC4D04C70665735EE35009C6A4B2B4A1CE6193FE",
        "n_operation": 2296
      },
      {
        "block": 229189,
        "account": 123023,
        "ophash":
            "457F03008FE0010002000000B2B0E2400DEA5986288A4E3085CC14B03275D1B6",
        "n_operation": 2
      },
      {
        "block": 35168,
        "account": 173055,
        "ophash":
            "60890000FFA3020001000000BCE7EDFF83559295EC3970ECC62C117707379E64",
        "n_operation": 1
      },
      {
        "block": 231121,
        "account": 997350,
        "ophash":
            "D1860300E6370F00F1040000DDBBD92EAE041C2098F1CB1F3C88ED1C79F9E8DA",
        "n_operation": 1265
      },
      {
        "block": 67055,
        "account": 285630,
        "ophash":
            "EF050100BE5B040034B60100D2CA60221142050917078582FA984B99A8747567",
        "n_operation": 112180
      },
      {
        "block": 72983,
        "account": 285630,
        "ophash":
            "171D0100BE5B0400C3B20300730AFC1008446B1F90A930F89251AEE3AFC9D57D",
        "n_operation": 242371
      },
      {
        "block": 158892,
        "account": 793940,
        "ophash":
            "AC6C0200541D0C000100000088AD60A0BB3F08881D83E41B6191E2E5B118E04F",
        "n_operation": 1
      },
      {
        "block": 266230,
        "account": 1330525,
        "ophash":
            "F60F04005D4D1400010000004B7E4500CB6BC0257319DB704737DA8FDA38BC9B",
        "n_operation": 1
      },
      {
        "block": 140840,
        "account": 703685,
        "ophash":
            "28260200C5BC0A0001000000E4D3864A81B404F59DDBF9D75EABF5B788BBB5C1",
        "n_operation": 1
      },
      {
        "block": 190862,
        "account": 572489,
        "ophash":
            "8EE9020049BC080005000000A726157B53939D13B4C49A2CEF280A6E41BDF6F7",
        "n_operation": 5
      },
      {
        "block": 94676,
        "account": 285630,
        "ophash":
            "D4710100BE5B040035240A0065BB7A9F157C83C699E81306107471FA82C9E16B",
        "n_operation": 664629
      },
      {
        "block": 188212,
        "account": 571630,
        "ophash":
            "34DF0200EEB80800DA16000035A561AA5DC3F4F34E37525887DF0CD8B4D5E449",
        "n_operation": 5850
      },
      {
        "block": 61770,
        "account": 285630,
        "ophash":
            "4AF10000BE5B0400ECCD0000E07F75D4C4F46D0ABF0737A59E59998B580F5E48",
        "n_operation": 52716
      },
      {
        "block": 58801,
        "account": 285630,
        "ophash":
            "B1E50000BE5B04001542000060C3D5550E1A4A488B4AB8142B556D463732CE79",
        "n_operation": 16917
      },
      {
        "block": 208528,
        "account": 571630,
        "ophash":
            "902E0300EEB80800932800003F2F5671DE1E92AABFD355978C1D999BF93048A4",
        "n_operation": 10387
      },
      {
        "block": 89217,
        "account": 285630,
        "ophash":
            "815C0100BE5B0400E5780800E44532047B0B9212F26C302F0976163349B0B985",
        "n_operation": 555237
      },
      {
        "block": 90111,
        "account": 285630,
        "ophash":
            "FF5F0100BE5B04000AB70800B934CBCCE1386D6FCFAC2B80715FD57C0282F527",
        "n_operation": 571146
      },
      {
        "block": 116728,
        "account": 285630,
        "ophash":
            "F8C70100BE5B040090651400B57326C2ABE06BFDC3B0AB4E6570DCCA49EF79CA",
        "n_operation": 1336720
      },
      {
        "block": 73665,
        "account": 285630,
        "ophash":
            "C11F0100BE5B04009CE30300412D6968BB41DC3F258C828E9692F6C79B9387A7",
        "n_operation": 254876
      },
      {
        "block": 82559,
        "account": 285630,
        "ophash":
            "7F420100BE5B040028AE0600203D5B831220417C1753434CB78BD0A6B37A05DD",
        "n_operation": 437800
      },
      {
        "block": 194530,
        "account": 571630,
        "ophash":
            "E2F70200EEB80800EB1B0000CDF3BA49E701A45D9E25DD5A621C0CC5CA3901B4",
        "n_operation": 7147
      },
      {
        "block": 209658,
        "account": 571630,
        "ophash":
            "FA320300EEB808006029000023CF5E172CA19904C21BB4C3D91B5C2EC7F841A3",
        "n_operation": 10592
      },
      {
        "block": 62783,
        "account": 285630,
        "ophash":
            "3FF50000BE5B0400C0FC0000BFB658DD8082E4115AC1B85007AF4281F57A1554",
        "n_operation": 64704
      },
      {
        "block": 74807,
        "account": 285630,
        "ophash":
            "37240100BE5B0400783F04003769FC2D41F555965687163DE7E04209FDB0AA87",
        "n_operation": 278392
      },
      {
        "block": 281239,
        "account": 1405660,
        "ophash":
            "974A0400DC721500010000005DB200F28EDFC92CF4C9F72E81A7610A499AB653",
        "n_operation": 1
      },
      {
        "block": 111515,
        "account": 556985,
        "ophash":
            "9BB30100B97F0800010000006F465BE5DEC8FCE281575C1C7FDC29587EAAE079",
        "n_operation": 1
      },
      {
        "block": 263638,
        "account": 629030,
        "ophash":
            "D60504002699090013000000016A0C4863B33A6F69F791CACF24CA0A4F19FB26",
        "n_operation": 19
      },
      {
        "block": 274693,
        "account": 86646,
        "ophash":
            "05310400765201004318000039188CD9667B9F976B5BF2D5F30BAF90E9476418",
        "n_operation": 6211
      },
      {
        "block": 145877,
        "account": 571630,
        "ophash":
            "D5390200EEB808001A0400009116476EBE64A5934AF7E6EE2ACBAF80F4FA62C9",
        "n_operation": 1050
      },
      {
        "block": 232635,
        "account": 1162610,
        "ophash":
            "BB8C030072BD11000100000035D826FA47FBEBCC9B69A6339ECA8F289C5B0982",
        "n_operation": 1
      },
      {
        "block": 114056,
        "account": 285630,
        "ophash":
            "88BD0100BE5B0400FEB312005F36CE4BFA2A3512E881233280AFCADCF656628B",
        "n_operation": 1225726
      },
      {
        "block": 157764,
        "account": 788290,
        "ophash":
            "4468020042070C0001000000E3FAFAC8D1FBCC58DD6E8E43C3C7C5193E7E5FD1",
        "n_operation": 1
      },
      {
        "block": 263688,
        "account": 571630,
        "ophash":
            "08060400EEB808005D3200009772534E6F7709721A0A76837582F1171490EECB",
        "n_operation": 12893
      },
      {
        "block": 292859,
        "account": 1463755,
        "ophash":
            "FB770400CB55160001000000DAFD5713EDA956C3F125695A34173D6BB091B8BB",
        "n_operation": 1
      },
      {
        "block": 104942,
        "account": 285630,
        "ophash":
            "EE990100BE5B040028C00D00B6EFB26D548C06463EE3A9CB03A7C61595A5E88E",
        "n_operation": 901160
      },
      {
        "block": 61347,
        "account": 285630,
        "ophash":
            "A3EF0000BE5B0400B0B700001827E619E75FC0763CFDC8180C6B74F5DFEF8935",
        "n_operation": 47024
      },
      {
        "block": 69560,
        "account": 86646,
        "ophash":
            "B80F01007652010032010000738F97EBD7D8FEBAB90C9A2089D065BDF538CDFB",
        "n_operation": 306
      },
      {
        "block": 134178,
        "account": 285630,
        "ophash":
            "220C0200BE5B04007636200093F3B5CA5191D3877C4BE69901FAAC5569BA2713",
        "n_operation": 2111094
      },
      {
        "block": 232301,
        "account": 285630,
        "ophash":
            "6D8B0300BE5B04005F6A4900351663D952610BDC983F6008AB263C283EEEAA9D",
        "n_operation": 4811359
      },
      {
        "block": 290096,
        "account": 1449960,
        "ophash":
            "306D0400E81F160001000000FA7874E1FC3EF638E350ED8B626AB2117D9C133B",
        "n_operation": 1
      },
      {
        "block": 107529,
        "account": 285630,
        "ophash":
            "09A40100BE5B04006D1A0F0011D643A9AFCFE0A4A1A80CFB3BB6944F1B659412",
        "n_operation": 989805
      },
      {
        "block": 150808,
        "account": 285630,
        "ophash":
            "184D0200BE5B04003BE12900905C9AE5DE3E400C8C6FDAECF69807F72CDF8697",
        "n_operation": 2744635
      },
      {
        "block": 186914,
        "account": 934030,
        "ophash":
            "22DA02008E400E00010000005210BF069E762463B42948FE60F7047EDE7D3FEA",
        "n_operation": 1
      },
      {
        "block": 173997,
        "account": 869465,
        "ophash":
            "ADA7020059440D0001000000C78DE8ECC0E023C2DF12A4B5810D8165F25F825F",
        "n_operation": 1
      },
      {
        "block": 71162,
        "account": 285630,
        "ophash":
            "FA150100BE5B0400D011030058051ECD204AEACCD5BC9BA68ED97964F0F92A53",
        "n_operation": 201168
      },
      {
        "block": 242551,
        "account": 1212205,
        "ophash":
            "77B303002D7F12000100000007C0BF59D5CDC341C365E48A2D537EA8054C8B87",
        "n_operation": 1
      },
      {
        "block": 195974,
        "account": 571630,
        "ophash":
            "86FD0200EEB80800321D000058EA507FDE5F08683B412521B31F263AB8676B73",
        "n_operation": 7474
      },
      {
        "block": 109145,
        "account": 285630,
        "ophash":
            "59AA0100BE5B040077F70F00CA8BBAEE5E977C95DA4D3882D8F12E4343C8B00D",
        "n_operation": 1046391
      },
      {
        "block": 62303,
        "account": 290760,
        "ophash":
            "5FF30000C86F0400EB370000D80724773D1F5F89FB1AE6D9344C8E5F52E7B48E",
        "n_operation": 14315
      },
      {
        "block": 71577,
        "account": 285630,
        "ophash":
            "99170100BE5B0400E63A0300CE16145F8908EA85661C40C8A5AC8BDD537AE8F2",
        "n_operation": 211686
      },
      {
        "block": 57774,
        "account": 285275,
        "ophash":
            "AEE100005B5A0400010000004412B05D554B42A85E187414EA41080124C07CDB",
        "n_operation": 1
      },
      {
        "block": 117363,
        "account": 586300,
        "ophash":
            "73CA01003CF2080001000000B6EAAE86D0F1C147245F73302D02B0941CA60F76",
        "n_operation": 1
      },
      {
        "block": 169580,
        "account": 285630,
        "ophash":
            "6C960200BE5B040021BC330005C7ADFF4859D3C8EC222D6F7CEFADD61E319BFC",
        "n_operation": 3390497
      },
      {
        "block": 102351,
        "account": 285630,
        "ophash":
            "CF8F0100BE5B0400F7AE0C005196D77D6665A1601F4A6A428C19CB93F36240CF",
        "n_operation": 831223
      },
      {
        "block": 299368,
        "account": 86646,
        "ophash":
            "6891040076520100DE180000800F975D2FE6829F66CA496046CF6174A87AD02B",
        "n_operation": 6366
      },
      {
        "block": 218466,
        "account": 300124,
        "ophash":
            "625503005C940400363100009CD22D59DF15BDFA15E2EFEB241ED9C362BD5EB0",
        "n_operation": 12598
      },
      {
        "block": 108165,
        "account": 285630,
        "ophash":
            "85A60100BE5B0400FE710F002B1C3A2A502AF7D7E886E73FC921508D0BDBBE12",
        "n_operation": 1012222
      },
      {
        "block": 155239,
        "account": 571630,
        "ophash":
            "675E0200EEB80800F606000039DC724377F4183B0DAC4226DAFE4C72ABB52178",
        "n_operation": 1782
      },
      {
        "block": 153795,
        "account": 768465,
        "ophash":
            "C3580200D1B90B000100000096EAAA3EA3FBC7AD1612E8D2A6F6E682A11A8477",
        "n_operation": 1
      },
      {
        "block": 106682,
        "account": 285630,
        "ophash":
            "BAA00100BE5B04000EA50E00A133B14F6C2F7FE7AD1EF5C4A0B1C51158CBCA0E",
        "n_operation": 959758
      },
      {
        "block": 260844,
        "account": 491587,
        "ophash":
            "ECFA03004380070004000000EFD74506349E2B87492F05DAE0CC709B1A3C5E5B",
        "n_operation": 4
      },
      {
        "block": 232479,
        "account": 1161855,
        "ophash":
            "1F8C03007FBA1100010000000D10A2CC87A3B4C10C1D9CF0864D04A551042E68",
        "n_operation": 1
      },
      {
        "block": 133133,
        "account": 665135,
        "ophash":
            "0D0802002F260A0001000000DB762E45A755AA0484CFFC7E8F9EDAC72B577C1C",
        "n_operation": 1
      },
      {
        "block": 238342,
        "account": 1191135,
        "ophash":
            "06A30300DF2C120001000000E42B689A6B237BBF86FAB8E5627E72AA1AB411FB",
        "n_operation": 1
      },
      {
        "block": 106439,
        "account": 285630,
        "ophash":
            "C79F0100BE5B0400D08F0E007C26B08B76A233D462201CB27FA954912D22FA3A",
        "n_operation": 954320
      },
      {
        "block": 241799,
        "account": 300124,
        "ophash":
            "87B003005C94040098310000717C94CBA92E2947E9C75C4FD6BF9E87BCB35685",
        "n_operation": 12696
      },
      {
        "block": 226298,
        "account": 1130940,
        "ophash":
            "FA730300BC41110001000000D862785EC29CB2058DBB437DC8FCB1667384DD4A",
        "n_operation": 1
      },
      {
        "block": 87638,
        "account": 285630,
        "ophash":
            "56560100BE5B0400020F0800CA5537DDDBFABD1580A814F4C5AB1898A381B4AD",
        "n_operation": 528130
      },
      {
        "block": 141540,
        "account": 707175,
        "ophash":
            "E428020067CA0A0001000000834E56C62C04B3343E9BDBC8E0B91E2608903916",
        "n_operation": 1
      },
      {
        "block": 149795,
        "account": 748450,
        "ophash":
            "23490200A26B0B000100000004886D5E848ED49EEBE94D5F52A4A3C6EE29FB36",
        "n_operation": 1
      },
      {
        "block": 239296,
        "account": 1195940,
        "ophash":
            "C0A60300A43F12000100000038E52E64781A9A880D92A723D152000284239335",
        "n_operation": 1
      },
      {
        "block": 104019,
        "account": 277710,
        "ophash":
            "53960100CE3C040003000000B28572731F7E2987F40082D1A59F7625D78AA261",
        "n_operation": 3
      },
      {
        "block": 193661,
        "account": 571630,
        "ophash":
            "7DF40200EEB80800411B0000069C082E03E69FA45379D79CDE3EC5B03D4C3116",
        "n_operation": 6977
      },
      {
        "block": 278010,
        "account": 1389535,
        "ophash":
            "FA3D0400DF3315000100000031D4B65CDD2768A92B3BB4B4CA559FEC55CE568C",
        "n_operation": 1
      },
      {
        "block": 178347,
        "account": 891210,
        "ophash":
            "ABB802004A990D0001000000AB7D7113E4B4B0BC2653A8502C015EF0B96CCD2E",
        "n_operation": 1
      },
      {
        "block": 280624,
        "account": 1402580,
        "ophash":
            "30480400D466150001000000D343BD349CF3BAB5CBA6DAEF3A5D4C0C6B0C148F",
        "n_operation": 1
      },
      {
        "block": 85457,
        "account": 285630,
        "ophash":
            "D14D0100BE5B04001579070043877EA4B35C6DCFBB5D4D84B56BA56918884CD2",
        "n_operation": 489749
      },
      {
        "block": 80255,
        "account": 400725,
        "ophash":
            "7F390100551D060001000000A38D6E76745E9B923EEC90328FDE87CB982F6433",
        "n_operation": 1
      },
      {
        "block": 77342,
        "account": 285630,
        "ophash":
            "1E2E0100BE5B0400651005003F7C7988A5B860BAD60BB8CB77409AC41EB37A6A",
        "n_operation": 331877
      },
      {
        "block": 209827,
        "account": 571630,
        "ophash":
            "A3330300EEB80800832900005AE3863F315D46D41D5917BC0BC3F68FC876BF53",
        "n_operation": 10627
      },
      {
        "block": 198158,
        "account": 571630,
        "ophash":
            "0E060300EEB80800401F00000E55440894AF1582B5D674E615510F4C1A65A313",
        "n_operation": 8000
      },
      {
        "block": 80426,
        "account": 285630,
        "ophash":
            "2A3A0100BE5B04000802060044610EBD2D79B7C029F886148FA0E69E0F414A2C",
        "n_operation": 393736
      },
      {
        "block": 238840,
        "account": 1193670,
        "ophash":
            "F8A40300C63612000100000014880C77F57226C1F7DE931B20FCF1F90EEEA25C",
        "n_operation": 1
      },
      {
        "block": 68716,
        "account": 285630,
        "ophash":
            "6C0C0100BE5B04002831020028619D74B2B9ECEC777012B04859B0944D0047E5",
        "n_operation": 143656
      },
      {
        "block": 292700,
        "account": 1462945,
        "ophash":
            "5C770400A152160001000000B5ADA3DF99C505F2A1EB1E09B6405BB0E821E015",
        "n_operation": 1
      },
      {
        "block": 68986,
        "account": 344395,
        "ophash":
            "7A0D01004B4105000100000019CC21892FFCE87A7D234F52CA02743F379F9A5B",
        "n_operation": 1
      },
      {
        "block": 265638,
        "account": 285630,
        "ophash":
            "A60D0400BE5B0400F9F34C002EE867782E74FB8C0E8ADAD2F68FB09A33C2E27C",
        "n_operation": 5043193
      },
      {
        "block": 144286,
        "account": 720915,
        "ophash":
            "9E33020013000B0001000000FF7F863F765E476B5F682BA7655571FC2B72E915",
        "n_operation": 1
      },
      {
        "block": 66642,
        "account": 332620,
        "ophash":
            "520401004C13050001000000A4DCE7D45C9DA7EEA6E531B410FF33DE5AAA6C5B",
        "n_operation": 1
      },
      {
        "block": 151600,
        "account": 757395,
        "ophash":
            "30500200938E0B000100000052B1951288F3A830BA35D7DC9679059139058215",
        "n_operation": 1
      },
      {
        "block": 153023,
        "account": 86646,
        "ophash":
            "BF5502007652010005090000C84FAD5374E640B2988D3382E65C554692248B3E",
        "n_operation": 2309
      },
      {
        "block": 119180,
        "account": 595385,
        "ophash":
            "8CD10100B915090001000000D07732F741DDA13C9FE9310C8BDAF9288AA3EE28",
        "n_operation": 1
      },
      {
        "block": 73918,
        "account": 168536,
        "ophash":
            "BE200100589202002C010000EDD9A0C915674CE26733FF8A2701500C7419887D",
        "n_operation": 300
      },
      {
        "block": 59705,
        "account": 290760,
        "ophash":
            "39E90000C86F040050190000030BC52C9A23AC0EE0E29D43999D609309DA8B27",
        "n_operation": 6480
      },
      {
        "block": 108305,
        "account": 221465,
        "ophash":
            "11A70100196103000400000065D286BE627CBC9F9334A601CFF75C024020442D",
        "n_operation": 4
      },
      {
        "block": 181038,
        "account": 904620,
        "ophash":
            "2EC30200ACCD0D00010000003B32D1FD6CAD511E918328C33BACD8E303146015",
        "n_operation": 1
      },
      {
        "block": 115615,
        "account": 285630,
        "ophash":
            "9FC30100BE5B0400E67C1300FE0C57E6A662324C75141A1A0F011F03DA5B51E4",
        "n_operation": 1277158
      },
      {
        "block": 210997,
        "account": 285630,
        "ophash":
            "35380300BE5B0400967C4600737359BD842D7A2E7457DDF771B391A130263080",
        "n_operation": 4619414
      },
      {
        "block": 261690,
        "account": 1307920,
        "ophash":
            "3AFE030010F5130001000000BEE212DD8F2D21F441F4FBA5866EB9393F7593D5",
        "n_operation": 1
      },
      {
        "block": 159083,
        "account": 291000,
        "ophash":
            "6B6D0200B87004006C000000C492ACC1D624E7A8C57701AC96CB4865D3E8838E",
        "n_operation": 108
      },
      {
        "block": 64051,
        "account": 290760,
        "ophash":
            "33FA0000C86F040087480000225345F05F73EF6DC5E45EE3CFC758581D326236",
        "n_operation": 18567
      },
      {
        "block": 296695,
        "account": 1482925,
        "ophash":
            "F7860400ADA0160001000000079C0969F77EBDF742CFE3B72514AD8DACC7EA5A",
        "n_operation": 1
      },
      {
        "block": 133963,
        "account": 669290,
        "ophash":
            "4B0B02006A360A0001000000C7973826D40C04F6D18F064036F873CBB279D1F3",
        "n_operation": 1
      },
      {
        "block": 91744,
        "account": 285630,
        "ophash":
            "60660100BE5B0400842E0900CC55D13C97A54DA9C6D5713A6ABDCA678B80BD5E",
        "n_operation": 601732
      },
      {
        "block": 100817,
        "account": 285630,
        "ophash":
            "D1890100BE5B04008C230C001923A8F9209D16C034C705695EC39694BF2588C9",
        "n_operation": 795532
      },
      {
        "block": 199439,
        "account": 330025,
        "ophash":
            "0F0B030029090500993B0000A3519DAAAD1C0E3FDDED205B5D32275E3F7BECF1",
        "n_operation": 15257
      },
      {
        "block": 65986,
        "account": 285630,
        "ophash":
            "C2010100BE5B0400B4790100A868312C9C496B59A243853A88AE1FB57F10FD12",
        "n_operation": 96692
      },
      {
        "block": 160219,
        "account": 285630,
        "ophash":
            "DB710200BE5B040093932E005A5878DBD5D5DA502FEAC60E4686AEB068B2EEE3",
        "n_operation": 3052435
      },
      {
        "block": 60436,
        "account": 285630,
        "ophash":
            "14EC0000BE5B0400568C00001CBB76EE0452B7D7F394AB9ABAE18545F59E1EDD",
        "n_operation": 35926
      },
      {
        "block": 192620,
        "account": 962590,
        "ophash":
            "6CF002001EB00E000100000055A952B6F8D3846FE906A3C81C01174EB51D285D",
        "n_operation": 1
      },
      {
        "block": 182223,
        "account": 108004,
        "ophash":
            "CFC70200E4A5010005000000F910CB7C86F843477AE30BB1435E2C3CACCAA825",
        "n_operation": 5
      },
      {
        "block": 285209,
        "account": 760518,
        "ophash":
            "195A0400C69A0B0003000000F676409AD52C51B579A0A0A3F05571E1B40C986F",
        "n_operation": 3
      },
      {
        "block": 142108,
        "account": 571630,
        "ophash":
            "1C2B0200EEB80800FE020000B79BAC7485DCE04DA207789E24F0E203D9A4D2DF",
        "n_operation": 766
      },
      {
        "block": 74788,
        "account": 285630,
        "ophash":
            "24240100BE5B0400693D0400E7B09877122ABFC1AF0E15B23B5435F53A8272F5",
        "n_operation": 277865
      },
      {
        "block": 61414,
        "account": 290760,
        "ophash":
            "E6EF0000C86F04000F2D0000D79AA87310A9AAA0BC48B124B2762A2337BEEB2A",
        "n_operation": 11535
      },
      {
        "block": 97630,
        "account": 285630,
        "ophash":
            "5E7D0100BE5B0400D7160B007A50498A5259C3E12A7D28D363451D1E834D95BC",
        "n_operation": 726743
      },
      {
        "block": 111125,
        "account": 285630,
        "ophash":
            "15B20100BE5B04007011110054F513E2FD3340625F164B420D02EDF2152B34AD",
        "n_operation": 1118576
      },
      {
        "block": 147689,
        "account": 737900,
        "ophash":
            "E94002006C420B00010000008B679215137E561942F85307D323EAC1ABF3DEAA",
        "n_operation": 1
      },
      {
        "block": 269978,
        "account": 486913,
        "ophash":
            "9A1E0400016E070008000000DB97F36609F2F7594572BA6F4893B97351D52153",
        "n_operation": 8
      },
      {
        "block": 127129,
        "account": 635105,
        "ophash":
            "99F00100E1B0090001000000291EA616D511D331D33052F79BF5429BF394D911",
        "n_operation": 1
      },
      {
        "block": 72978,
        "account": 285630,
        "ophash":
            "121D0100BE5B0400D4B103007904A0D4A1688623ED6F90D093C56FF99FE85616",
        "n_operation": 242132
      },
      {
        "block": 270708,
        "account": 1352990,
        "ophash":
            "742104001EA51400010000009311521B68496FC38F818FEA1585926C0828D1E2",
        "n_operation": 1
      },
      {
        "block": 135193,
        "account": 285630,
        "ophash":
            "19100200BE5B04008ACE200004A62782CB17240963573B0CADF98A12DA45C842",
        "n_operation": 2150026
      },
      {
        "block": 70975,
        "account": 285630,
        "ophash":
            "3F150100BE5B04009AFE020038E9EE0011192A780757EBF01223AF3F02E7B5D5",
        "n_operation": 196250
      },
      {
        "block": 78820,
        "account": 285630,
        "ophash":
            "E4330100BE5B04008B840500EB31976BBD39522BFBADE4A53F9EB16249D13E7A",
        "n_operation": 361611
      },
      {
        "block": 74357,
        "account": 164080,
        "ophash":
            "75220100F0800200A8010000F5678895A31BFE35F9B55104D52302C74C37EB32",
        "n_operation": 424
      },
      {
        "block": 83024,
        "account": 285630,
        "ophash":
            "50440100BE5B04002FBD06007830B13DB5E0B3244CAA32910EB26434E08A51DF",
        "n_operation": 441647
      },
      {
        "block": 195775,
        "account": 825070,
        "ophash":
            "BFFC0200EE960C0048000000F3724DFE6C38C86AB864C19D294380D06519F3BE",
        "n_operation": 72
      },
      {
        "block": 192640,
        "account": 277924,
        "ophash":
            "80F00200A43D040005000000EA24689E5CAAD61985A78551C7963B68ED695D60",
        "n_operation": 5
      },
      {
        "block": 199528,
        "account": 997090,
        "ophash":
            "680B0300E2360F0001000000A3F20E1CD852DC6C5A13B59ACC59080C54442412",
        "n_operation": 1
      },
      {
        "block": 118128,
        "account": 590120,
        "ophash":
            "70CD010028010900010000002E7CD958B815D1C346EA7353BC190927E8BF4FC0",
        "n_operation": 1
      },
      {
        "block": 63818,
        "account": 285630,
        "ophash":
            "4AF90000BE5B04005E2A0100FD8B53EC95427D8A140472A3DF0F80969BD26A19",
        "n_operation": 76382
      },
      {
        "block": 175911,
        "account": 879020,
        "ophash":
            "27AF0200AC690D00010000006B3012B5398F907C7C0C4F21057C43B9C62594F3",
        "n_operation": 1
      },
      {
        "block": 62560,
        "account": 285630,
        "ophash":
            "60F40000BE5B0400AAF1000049F96C59BE2E0611C611EB3945E213FC1E0C3AD6",
        "n_operation": 61866
      },
      {
        "block": 154255,
        "account": 770745,
        "ophash":
            "8F5A0200B9C20B0001000000F6045C22F8BDD3FF69ECD6DF873819A5E5C6B7C0",
        "n_operation": 1
      },
      {
        "block": 141790,
        "account": 708410,
        "ophash":
            "DE2902003ACF0A0001000000B7351179FF015A3C23C045BD4DCB249ECE4E3CEA",
        "n_operation": 1
      },
      {
        "block": 129348,
        "account": 285630,
        "ophash":
            "44F90100BE5B0400DA3E1D0022B2996A3959FEC1F0EB3A39A76349062650DCF1",
        "n_operation": 1916634
      },
      {
        "block": 186339,
        "account": 931175,
        "ophash":
            "E3D7020067350E0001000000BA5F55D3D9F9DC7242F0AED2618F959F47321D57",
        "n_operation": 1
      },
      {
        "block": 188972,
        "account": 571630,
        "ophash":
            "2CE20200EEB80800671700004DB6DE9F3CB9B068D467012BDAEF80B620A93C1C",
        "n_operation": 5991
      },
      {
        "block": 115377,
        "account": 3000,
        "ophash":
            "B1C20100B80B00000B000000EED3BDF136A7D2E2622DA5BDF4D2518E2143C4C1",
        "n_operation": 11
      },
      {
        "block": 268965,
        "account": 606554,
        "ophash":
            "A51A04005A41090002000000BED47E723749CEC40EBD075E354E12E621F8DEF7",
        "n_operation": 2
      },
      {
        "block": 88544,
        "account": 285630,
        "ophash":
            "E0590100BE5B0400244B0800FA3C3C477EA82F11FC9D0CE2ED348C7277BFCFA6",
        "n_operation": 543524
      },
      {
        "block": 208259,
        "account": 571630,
        "ophash":
            "832D0300EEB80800652800009B28B65D634148B65371FCBAFE74122114E79ABD",
        "n_operation": 10341
      },
      {
        "block": 101640,
        "account": 285630,
        "ophash":
            "088D0100BE5B0400FD6E0C00C740C9D2E2A54276F11E5DAF54F13C16668B648C",
        "n_operation": 814845
      },
      {
        "block": 121985,
        "account": 285630,
        "ophash":
            "81DC0100BE5B04007A3C18005AD65BD739082482F86244FC7DC729DC3F516343",
        "n_operation": 1588346
      },
      {
        "block": 173397,
        "account": 866425,
        "ophash":
            "55A5020079380D0001000000C5C6739341E83B27F273810B085198D305988B92",
        "n_operation": 1
      },
      {
        "block": 126565,
        "account": 632295,
        "ophash":
            "65EE0100E7A50900010000007C027B6643F3C6B0BFF291C2AD1CDF55519CDF60",
        "n_operation": 1
      },
      {
        "block": 154868,
        "account": 288887,
        "ophash":
            "F45C0200776804000100000026646F5B9F93C150724522AECD342C438237D951",
        "n_operation": 1
      },
      {
        "block": 153458,
        "account": 766735,
        "ophash":
            "725702000FB30B0001000000FDCEA3DB20BF980BE39EF77906E5A8A24B8ED114",
        "n_operation": 1
      },
      {
        "block": 162925,
        "account": 86646,
        "ophash":
            "6D7C0200765201006B0B00001D799BD966B1E5FCBE16689AA47EF90D17D6CAA1",
        "n_operation": 2923
      },
      {
        "block": 260980,
        "account": 496961,
        "ophash":
            "74FB0300419507000600000091D2A0F5B48313B996537006DB86C216D64C6D8B",
        "n_operation": 6
      },
      {
        "block": 78311,
        "account": 76623,
        "ophash":
            "E73101004F2B010003000000D0FD1F5AB2D073A52264E04484ECDD9CE9F39689",
        "n_operation": 3
      },
      {
        "block": 143628,
        "account": 280240,
        "ophash":
            "0C310200B046040003000000A5C8EA1B98E9DAC9D60FD98A412BD6E555CEF45A",
        "n_operation": 3
      },
      {
        "block": 258737,
        "account": 332699,
        "ophash":
            "B1F203009B130500030000008C2EB0A10FFE8D9889F08DBC381AB8EB6F5DE6C6",
        "n_operation": 3
      },
      {
        "block": 177174,
        "account": 70666,
        "ophash":
            "16B402000A140100830000007EE3FE8F35E90E5617C758DFE04625617E2723D1",
        "n_operation": 131
      },
      {
        "block": 62168,
        "account": 290760,
        "ophash":
            "D8F20000C86F04004F3600000164E1B59D5FB4A50EADD29609B0B94FAF623B57",
        "n_operation": 13903
      },
      {
        "block": 222586,
        "account": 571630,
        "ophash":
            "7A650300EEB80800DC2B00001DF41A07D42C99D6A2434AB6E9FB33CD09372E17",
        "n_operation": 11228
      },
      {
        "block": 16288,
        "account": 80125,
        "ophash":
            "A03F0000FD3801000100000084069278A93E2404F22A0392B108CE72D6AD6959",
        "n_operation": 1
      },
      {
        "block": 87018,
        "account": 434445,
        "ophash":
            "EA5301000DA10600010000004B7785333181F52A375C584BA1C7A1AE21C10DE3",
        "n_operation": 1
      },
      {
        "block": 105851,
        "account": 285630,
        "ophash":
            "7B9D0100BE5B040072400E00328AE38086FF9C72903C0BE1C8F34D55E7CE9D5D",
        "n_operation": 934002
      },
      {
        "block": 63415,
        "account": 290760,
        "ophash":
            "B7F70000C86F0400D7420000233A397CA4F1098F31C4B09A911F3F17D102602B",
        "n_operation": 17111
      },
      {
        "block": 61140,
        "account": 290760,
        "ophash":
            "D4EE0000C86F0400302A00009E395ADECE28BAD24AEAE35ABE98CF797E50D797",
        "n_operation": 10800
      },
      {
        "block": 176694,
        "account": 187687,
        "ophash":
            "36B2020027DD0200070000009D9F27E63C413B9493675F96FB6900C5981ACB49",
        "n_operation": 7
      },
      {
        "block": 68418,
        "account": 290760,
        "ophash":
            "420B0100C86F0400CF6A0000A6BA0802126499CAC22A85DA720F28A9E436B0E5",
        "n_operation": 27343
      },
      {
        "block": 87692,
        "account": 285630,
        "ophash":
            "8C560100BE5B0400A012080020ACF23642B3F38EF9C4D8A60474461916BE495B",
        "n_operation": 529056
      },
      {
        "block": 116436,
        "account": 285630,
        "ophash":
            "D4C60100BE5B0400E13C140020DCAE36BC9BF08E90293ED2B821B41CCB32B998",
        "n_operation": 1326305
      },
      {
        "block": 67196,
        "account": 8777,
        "ophash":
            "7C06010049220000020000008195AF37A669F30B23966F56E1A20338674F7214",
        "n_operation": 2
      },
      {
        "block": 102062,
        "account": 5700,
        "ophash":
            "AE8E0100441600000B00000087B3EE2A8F68AFE2BA6C98A61C5367C83CCBA2C6",
        "n_operation": 11
      },
      {
        "block": 192490,
        "account": 274806,
        "ophash":
            "EAEF020076310400080000009892C1D63CA78796E521FC4D52B282EDFA990CA4",
        "n_operation": 8
      },
      {
        "block": 212443,
        "account": 571630,
        "ophash":
            "DB3D0300EEB80800462A000097FABA85B9F4502B59FED76F9B18065CC22BB610",
        "n_operation": 10822
      },
      {
        "block": 154862,
        "account": 110027,
        "ophash":
            "EE5C0200CBAD010037000000B17AE42708FADA0F019606032068A6032F176BE2",
        "n_operation": 55
      },
      {
        "block": 281001,
        "account": 1404440,
        "ophash":
            "A9490400186E1500010000003B8F699EDDD094F83E96628D9136C3F6981F08A8",
        "n_operation": 1
      },
      {
        "block": 278332,
        "account": 1391145,
        "ophash":
            "3C3F0400293A1500010000003B1B6FAF0CFDCBF62C36E5B9314C93FE37450A24",
        "n_operation": 1
      },
      {
        "block": 139716,
        "account": 698065,
        "ophash":
            "C4210200D1A60A0001000000D5B0934C694BAF6F97E9833B840D30D8ED88CE5C",
        "n_operation": 1
      },
      {
        "block": 111983,
        "account": 285630,
        "ophash":
            "6FB50100BE5B04009D881100B66EA066E986F62EE4B890533D51CFB3DE19CBC3",
        "n_operation": 1149085
      },
      {
        "block": 282275,
        "account": 819528,
        "ophash":
            "A34E040048810C0002000000532805B76DD9A990876DD3A8C45A1F8D2896A746",
        "n_operation": 2
      },
      {
        "block": 133039,
        "account": 664670,
        "ophash":
            "AF0702005E240A0001000000AB1FAFA1642BE7581FBB164E8C07416104430B1F",
        "n_operation": 1
      },
      {
        "block": 270592,
        "account": 571630,
        "ophash":
            "00210400EEB808000E330000750597722571AF2B0C09C26660032827C0A76DE2",
        "n_operation": 13070
      },
      {
        "block": 203372,
        "account": 1016345,
        "ophash":
            "6C1A030019820F0001000000132923B2846980F8A089A0337ED90FE5C3023F1C",
        "n_operation": 1
      },
      {
        "block": 109270,
        "account": 545825,
        "ophash":
            "D6AA01002154080001000000747B2FCE52876440DCB0F66E477CE024C5EDDF66",
        "n_operation": 1
      },
      {
        "block": 238685,
        "account": 1192890,
        "ophash":
            "5DA40300BA331200010000004BFA69C13A1E482D6BDFE6AEEA3DEC37CE2E288F",
        "n_operation": 1
      },
      {
        "block": 66953,
        "account": 319055,
        "ophash":
            "890501004FDE040002000000055BBB62952AA382C23A187AD5A7202C1032BDE5",
        "n_operation": 2
      },
      {
        "block": 268621,
        "account": 498985,
        "ophash":
            "4D190400299D070003000000FD96CF14F099E78A522A03E943DB03D5F212EE5E",
        "n_operation": 3
      },
      {
        "block": 199725,
        "account": 998040,
        "ophash":
            "2D0C0300983A0F00010000009EBEA6A74E12AF5993822D61C3A9AD65AE131017",
        "n_operation": 1
      },
      {
        "block": 272716,
        "account": 499126,
        "ophash":
            "4C290400B69D0700030000002BF367AA4D35AD52FD79B05FB8D1D8DD0A48A9B0",
        "n_operation": 3
      },
      {
        "block": 128157,
        "account": 640255,
        "ophash":
            "9DF40100FFC40900010000006FA26FD6D1D52BF73AB2679EAD3504D2B1E26DBB",
        "n_operation": 1
      },
      {
        "block": 193219,
        "account": 965545,
        "ophash":
            "C3F20200A9BB0E00010000005834FC26E23903935BA5B8136C38053C90B51EE4",
        "n_operation": 1
      },
      {
        "block": 192498,
        "account": 961975,
        "ophash":
            "F2EF0200B7AD0E0001000000C5B26D5018E7166B50B9D647D3EBBA162F043248",
        "n_operation": 1
      },
      {
        "block": 142377,
        "account": 711345,
        "ophash":
            "292C0200B1DA0A00010000005236B65489FBA035B1055F9D69DC929C6D614BBE",
        "n_operation": 1
      },
      {
        "block": 115071,
        "account": 273457,
        "ophash":
            "7FC10100312C04000800000003958CB6E7DFB84C8177B6709B85025A66B5BE75",
        "n_operation": 8
      },
      {
        "block": 100755,
        "account": 285630,
        "ophash":
            "93890100BE5B04002C1C0C00AFC67A612F9E5A0743722C1A66DD336695CB991C",
        "n_operation": 793644
      },
      {
        "block": 262472,
        "account": 1311815,
        "ophash":
            "480104004704140001000000E920C5A6EA14C6272CF6B7227C2D7C4D74A78E7B",
        "n_operation": 1
      },
      {
        "block": 65583,
        "account": 143351,
        "ophash":
            "2F000100F72F0200C2020000E1A120FE8294782A53018C22364C855359F88A6C",
        "n_operation": 706
      },
      {
        "block": 191389,
        "account": 86646,
        "ophash":
            "9DEB02007652010084130000BEFA71B5B4F679FD8DEA95DD9A7C6A4E812F4BD4",
        "n_operation": 4996
      },
      {
        "block": 209856,
        "account": 1048755,
        "ophash":
            "C0330300B30010000100000052161C6F0532D8967A52DABFDC4135D967745027",
        "n_operation": 1
      },
      {
        "block": 179459,
        "account": 86646,
        "ophash":
            "03BD020076520100E9110000584F21A435190ACC982EF4AEF5CFCBC3D64A65BD",
        "n_operation": 4585
      },
      {
        "block": 94882,
        "account": 285630,
        "ophash":
            "A2720100BE5B04000F360A001BA089283D45FC711FB95F745E07E7947F5CEC63",
        "n_operation": 669199
      },
      {
        "block": 91212,
        "account": 285630,
        "ophash":
            "4C640100BE5B0400E1060900225D77444FA41E3BE05618072F1FE581C2C325EB",
        "n_operation": 591585
      },
      {
        "block": 64008,
        "account": 285630,
        "ophash":
            "08FA0000BE5B0400F7310100EC7A451304C18584A764F21AF26C8AAC11E50901",
        "n_operation": 78327
      },
      {
        "block": 224530,
        "account": 381309,
        "ophash":
            "126D03007DD1050043000000FAC405D758B00AD17D50D3C00DA3406F45B8AF41",
        "n_operation": 67
      },
      {
        "block": 300641,
        "account": 1502685,
        "ophash":
            "61960400DDED16000100000007DEB18409224CDFDB87D6C0ABBC1B6A4D5B743B",
        "n_operation": 1
      },
      {
        "block": 142235,
        "account": 710665,
        "ophash":
            "9B2B020009D80A0001000000B0AFBB1C212FE9DFD2685901D1F20E01BD85BDD8",
        "n_operation": 1
      },
      {
        "block": 74887,
        "account": 290760,
        "ophash":
            "87240100C86F040090850000BCCDA654BC4FEDF51B4A092262C2E86720008884",
        "n_operation": 34192
      },
      {
        "block": 168152,
        "account": 126651,
        "ophash":
            "D8900200BBEE0100070000008E0AC8AA36B3A5813D100390E0DD2C0DA1123E7A",
        "n_operation": 7
      },
      {
        "block": 130854,
        "account": 86646,
        "ophash":
            "26FF0100765201004E0700002A84EFA0509C52B51CEA202429C052DFFC02938D",
        "n_operation": 1870
      },
      {
        "block": 106139,
        "account": 285630,
        "ophash":
            "9B9E0100BE5B040089680E005CE5E82B05DBF7EDD4FDA5FD81A413D3A6178465",
        "n_operation": 944265
      },
      {
        "block": 96537,
        "account": 89007,
        "ophash":
            "19790100AF5B010014000000BDE0DCA8F813BF5CFE789A1A7183EF4E3D7D7934",
        "n_operation": 20
      },
      {
        "block": 281586,
        "account": 1407400,
        "ophash":
            "F24B0400A8791500010000001CF8FF65A6AFE7178CE9FD88D121D2F1DD458069",
        "n_operation": 1
      },
      {
        "block": 184240,
        "account": 920670,
        "ophash":
            "B0CF02005E0C0E0001000000D5734C8DF8E624FCE463B23A3FE9ACEEA556A7CA",
        "n_operation": 1
      },
      {
        "block": 98683,
        "account": 285630,
        "ophash":
            "7B810100BE5B0400BD760B006A9BFB5B4F7653551C09DA91CD92AA25BCEDD93D",
        "n_operation": 751293
      },
      {
        "block": 53656,
        "account": 266030,
        "ophash":
            "98D100002E0F040001000000932C2A8CD9E8B262EA2D8689EC153A5E97D16DEE",
        "n_operation": 1
      },
      {
        "block": 207520,
        "account": 1037045,
        "ophash":
            "A02A0300F5D20F00010000002238E5068DCE2DE5EBEAF0CE3F7AB71A07F7CC38",
        "n_operation": 1
      },
      {
        "block": 18362,
        "account": 91200,
        "ophash":
            "BA470000406401000100000088BA572EBB52A21AC173340DD7C57FE5025CE2A3",
        "n_operation": 1
      },
      {
        "block": 144684,
        "account": 285630,
        "ophash":
            "2C350200BE5B0400F96B2600B4C55F31BF2B6B23738D659A4F630B3D6424FCE8",
        "n_operation": 2518009
      },
      {
        "block": 201046,
        "account": 1004700,
        "ophash":
            "561103009C540F000100000082FB2172B4704DD12C05C1F8074B235B7128F132",
        "n_operation": 1
      },
      {
        "block": 87388,
        "account": 436320,
        "ophash":
            "5C55010060A8060001000000EEE2226358311846A794DFF3478D6B06E7BC3DAD",
        "n_operation": 1
      },
      {
        "block": 242880,
        "account": 1213840,
        "ophash":
            "C0B4030090851200010000004D9970D1C9D3E6C2559D042DD069F08DEC7F999D",
        "n_operation": 1
      },
      {
        "block": 96598,
        "account": 285630,
        "ophash":
            "56790100BE5B04009BBC0A000D033E80E36C8430977078C2CC5FA5F146538651",
        "n_operation": 703643
      },
      {
        "block": 254900,
        "account": 1273950,
        "ophash":
            "B4E303005E70130001000000061020BA3DB9050659AB719EFF4A0B85FE7D5FA7",
        "n_operation": 1
      },
      {
        "block": 114649,
        "account": 572700,
        "ophash":
            "D9BF01001CBD080001000000FE26085E50BFC27208A7FD6A2A5BB943111E6313",
        "n_operation": 1
      },
      {
        "block": 146469,
        "account": 731830,
        "ophash":
            "253C0200B62A0B000100000029F0CFC44AAD76DE0BC8077476D1BAD668E6AEC4",
        "n_operation": 1
      },
      {
        "block": 273753,
        "account": 1368220,
        "ophash":
            "592D04009CE0140001000000B14A040D25442A5493DE14AB4A9117ED7D7AF2FC",
        "n_operation": 1
      },
      {
        "block": 159573,
        "account": 797340,
        "ophash":
            "556F02009C2A0C000100000054DDF024B531F71C7F694E62A5290D2998854569",
        "n_operation": 1
      },
      {
        "block": 116746,
        "account": 583210,
        "ophash":
            "0AC801002AE6080001000000C50B62E84A64E8EE0B4B3AC72D589F1B1DCF9D2C",
        "n_operation": 1
      },
      {
        "block": 252962,
        "account": 1264265,
        "ophash":
            "22DC0300894A13000100000091900DA53DDD120E293861C628452142D7197056",
        "n_operation": 1
      },
      {
        "block": 143633,
        "account": 273374,
        "ophash":
            "11310200DE2B040005000000F5848050FAB5557E4C69E92939D712B4386A4D7C",
        "n_operation": 5
      },
      {
        "block": 96054,
        "account": 285630,
        "ophash":
            "36770100BE5B0400B0990A00A48B953E9BFBF28B2CBC92CCDFB9334A38FCB806",
        "n_operation": 694704
      },
      {
        "block": 108636,
        "account": 285630,
        "ophash":
            "5CA80100BE5B04006AAE0F00C8C83D301BD2BD709EF663CB7C2B5434253047FA",
        "n_operation": 1027690
      },
      {
        "block": 191259,
        "account": 353958,
        "ophash":
            "1BEB0200A666050005000000B04BCDC560A1D335E6674FD3966107FDDCC096A7",
        "n_operation": 5
      },
      {
        "block": 84274,
        "account": 420805,
        "ophash":
            "32490100C56B0600010000004CA17997436AB7943D7A91AACACE4CAD3422FBA6",
        "n_operation": 1
      },
      {
        "block": 66264,
        "account": 330800,
        "ophash":
            "D8020100300C0500010000005A2A830E3ECE531282B5523417DF0791810F9386",
        "n_operation": 1
      },
      {
        "block": 161129,
        "account": 285630,
        "ophash":
            "69750200BE5B040005222F000E4C2F29B3BA06DEB710242474499C06661F069C",
        "n_operation": 3088901
      },
      {
        "block": 167653,
        "account": 285630,
        "ophash":
            "E58E0200BE5B0400ADBA3200703DF4F140DFB40A1F7233018FA60FF2340B7C10",
        "n_operation": 3324589
      },
      {
        "block": 248791,
        "account": 1243410,
        "ophash":
            "D7CB030012F91200010000007F72374C11D166C8A8DDF3EF7960489BF310B973",
        "n_operation": 1
      },
      {
        "block": 176927,
        "account": 86646,
        "ophash":
            "1FB30200765201005E110000D9EB6B29D13ABCBA3A58581FC0C0D83581763852",
        "n_operation": 4446
      },
      {
        "block": 35167,
        "account": 171705,
        "ophash":
            "5F890000B99E020001000000D48B7B0CD8C2ECFB19826E05BB1534280FB96A56",
        "n_operation": 1
      },
      {
        "block": 214507,
        "account": 285630,
        "ophash":
            "EB450300BE5B0400972C4700802EB477F4B9CBAB99FAC0F3468CDC6BC3F0207B",
        "n_operation": 4664471
      },
      {
        "block": 166256,
        "account": 86646,
        "ophash":
            "7089020076520100160D000094ADA73BAF4C3EFE0FEF79F109727374FC830252",
        "n_operation": 3350
      },
      {
        "block": 279837,
        "account": 571630,
        "ophash":
            "1D450400EEB80800C433000031B0011C8F6A9B9AC7ECB325AAE5B0C3F5613A0D",
        "n_operation": 13252
      },
      {
        "block": 59194,
        "account": 285630,
        "ophash":
            "3AE70000BE5B0400E6520000C44551ABBE8C26AC05091E2C5AA15384092DCFC4",
        "n_operation": 21222
      },
      {
        "block": 58144,
        "account": 285630,
        "ophash":
            "20E30000BE5B04000B260000AD91A5390E2CCF6CCAD06D7BFCE5B712A44FA7A9",
        "n_operation": 9739
      },
      {
        "block": 26078,
        "account": 127190,
        "ophash":
            "DE650000D6F0010001000000C4F2818096834B832692D7F97983F7EC5E8C9D82",
        "n_operation": 1
      },
      {
        "block": 171250,
        "account": 285630,
        "ophash":
            "F29C0200BE5B0400E1AE340017663710C7B766A373DE9123DE9EFF7E791F4B09",
        "n_operation": 3452641
      },
      {
        "block": 299487,
        "account": 646070,
        "ophash":
            "DF910400B6DB09000D000000256C2B6576FEBC1DA3D2F2061542C7F662C1DF90",
        "n_operation": 13
      },
      {
        "block": 63819,
        "account": 285630,
        "ophash":
            "4BF90000BE5B0400622A010075896B6495E7BD67C01B034F5348D5F471CCD6EB",
        "n_operation": 76386
      },
      {
        "block": 81425,
        "account": 285630,
        "ophash":
            "113E0100BE5B040056500600D97DDCF8926055FA732ED56CC994ED55745A22B2",
        "n_operation": 413782
      },
      {
        "block": 241388,
        "account": 1206405,
        "ophash":
            "ECAE03008568120001000000176DF43B372231B14E9E51E4BBE9E6C43D49B6E7",
        "n_operation": 1
      },
      {
        "block": 184690,
        "account": 548246,
        "ophash":
            "72D10200965D080002000000F142231D2C48997802804C59CCDDB41D9CD8F380",
        "n_operation": 2
      },
      {
        "block": 166748,
        "account": 833180,
        "ophash":
            "5C8B02009CB60C0001000000324D269A0A960FCFBAFA3FC320764F4E725A6058",
        "n_operation": 1
      },
      {
        "block": 279267,
        "account": 1395820,
        "ophash":
            "E34204006C4C15000100000013EA80DF4CAE91FA9DB01DA1B0E725CE3C263862",
        "n_operation": 1
      },
      {
        "block": 82196,
        "account": 143351,
        "ophash":
            "14410100F72F02006A03000024A514DD3B662E9E143DA1CE2FB8925A2FF4818C",
        "n_operation": 874
      },
      {
        "block": 175149,
        "account": 523548,
        "ophash":
            "2DAC02001CFD070002000000FC73953AFFD16E22867BA8094C2A9DB79DC6D470",
        "n_operation": 2
      },
      {
        "block": 182400,
        "account": 911465,
        "ophash":
            "80C8020069E80D0001000000C513A518C594719979DF6C0E7FB9D272F14D4014",
        "n_operation": 1
      },
      {
        "block": 109706,
        "account": 285630,
        "ophash":
            "8AAC0100BE5B0400CD4410005A70FFE489B5DD0547DBDF3286A8B4E55FAFF4E9",
        "n_operation": 1066189
      },
      {
        "block": 199336,
        "account": 996095,
        "ophash":
            "A80A0300FF320F00010000003FAA7CBFEE3A395F4834AEB64AFAD4773FF821CD",
        "n_operation": 1
      },
      {
        "block": 135797,
        "account": 678465,
        "ophash":
            "75120200415A0A00010000003DB061394EC0C53F46BF808077E1DE478AC5E3DF",
        "n_operation": 1
      },
      {
        "block": 63304,
        "account": 285630,
        "ophash":
            "48F70000BE5B04007A16010051553F93D91971580DF55E2C49F157B6335EFE04",
        "n_operation": 71290
      },
      {
        "block": 110677,
        "account": 285630,
        "ophash":
            "55B00100BE5B04005AD01000F9A9D20F828BACC6C49975B4D5B419D04F357682",
        "n_operation": 1101914
      },
      {
        "block": 56660,
        "account": 282565,
        "ophash":
            "54DD0000C54F0400010000004CCEF4C4092648DFF54C8149D7FEFFAB37965E2B",
        "n_operation": 1
      },
      {
        "block": 232091,
        "account": 300124,
        "ophash":
            "9B8A03005C9404007331000074A47850FD4E4343D0C692149C62A2C27EBC57C5",
        "n_operation": 12659
      },
      {
        "block": 56175,
        "account": 54280,
        "ophash":
            "6FDB000008D400000100000038D155D5E4B317A70D6E8453A9B5ACE095697459",
        "n_operation": 1
      },
      {
        "block": 285148,
        "account": 1425130,
        "ophash":
            "DC590400EABE1500010000002C4ABCC66A354E37F83A0E4B1984203CCC3E679F",
        "n_operation": 1
      },
      {
        "block": 171664,
        "account": 857805,
        "ophash":
            "909E0200CD160D000100000060F4D7C990C1CE84BF689E37E108018569A08D12",
        "n_operation": 1
      },
      {
        "block": 100931,
        "account": 285630,
        "ophash":
            "438A0100BE5B0400562F0C000172CD9AE0F2149A5DC81404EE1A39A23FCCDBE4",
        "n_operation": 798550
      },
      {
        "block": 208792,
        "account": 1043440,
        "ophash":
            "982F0300F0EB0F0001000000570B39A1F4C59C34A372F0E7D69B6EA1D6905E51",
        "n_operation": 1
      },
      {
        "block": 42969,
        "account": 205555,
        "ophash":
            "D9A70000F322030002000000F5A5C55D4D0C104A71B42CEFB877D117D33FE961",
        "n_operation": 2
      },
      {
        "block": 61021,
        "account": 285630,
        "ophash":
            "5DEE0000BE5B04006FA80000CADF26B5B364C284CD5BCD71786DB920681020C8",
        "n_operation": 43119
      },
      {
        "block": 218392,
        "account": 1091445,
        "ophash":
            "1855030075A71000010000006C5071F700911F397FF35AA1BCEE11333D99AAC7",
        "n_operation": 1
      },
      {
        "block": 277861,
        "account": 285630,
        "ophash":
            "653D0400BE5B0400CA0E4E00DB77778147D80F1EC2F01CF24FA44BE5DD8F3BAE",
        "n_operation": 5115594
      },
      {
        "block": 107268,
        "account": 285630,
        "ophash":
            "04A30100BE5B04002EF50E0032A48674A762B134F319B19148F0072FC9CDB78B",
        "n_operation": 980270
      },
      {
        "block": 191620,
        "account": 957575,
        "ophash":
            "84EC0200879C0E00010000003200769C0EC4BA046A75B41A41F10E4E0B64BE12",
        "n_operation": 1
      },
      {
        "block": 131444,
        "account": 285630,
        "ophash":
            "74010200BE5B040083791E00EA4245B88C9415366EBE59081CDC1D00F8FE638D",
        "n_operation": 1997187
      },
      {
        "block": 89425,
        "account": 285630,
        "ophash":
            "515D0100BE5B04002086080085E041562E7DBBAEFF3A420E7BDF41E0418C08B8",
        "n_operation": 558624
      },
      {
        "block": 7025,
        "account": 16295,
        "ophash":
            "711B0000A73F000001000000AA5E9D9C17729B7DAB5136497ED9FE0E8F36746E",
        "n_operation": 1
      },
      {
        "block": 160031,
        "account": 799625,
        "ophash":
            "1F71020089330C0001000000DA592B4BFC10385BB96F62D9C705E118A483C43B",
        "n_operation": 1
      },
      {
        "block": 137699,
        "account": 285630,
        "ophash":
            "E3190200BE5B0400C86D22004EAD104BA309389806C500AD0D930E232E537903",
        "n_operation": 2256328
      },
      {
        "block": 250695,
        "account": 1252925,
        "ophash":
            "47D303003D1E130001000000E5FE1B395AF54C91AC1A28C8E11380D0D325B1ED",
        "n_operation": 1
      },
      {
        "block": 132558,
        "account": 662270,
        "ophash":
            "CE050200FE1A0A0001000000B303CD1039E7B38CBEB1A918FD58E5D3403AA8B5",
        "n_operation": 1
      },
      {
        "block": 59717,
        "account": 290760,
        "ophash":
            "45E90000C86F04009B19000018A592ECD4DCE9CC4535E2493A9BF85CF51134C1",
        "n_operation": 6555
      },
      {
        "block": 12532,
        "account": 61020,
        "ophash":
            "F43000005CEE000001000000EE63CA195262F699006EEDB2A744A59130B1876B",
        "n_operation": 1
      },
      {
        "block": 300361,
        "account": 1501275,
        "ophash":
            "499504005BE8160001000000B1200433AA038FB1E83545DC8A1B17492FBAD196",
        "n_operation": 1
      },
      {
        "block": 228322,
        "account": 1141055,
        "ophash":
            "E27B03003F6911000100000098589A424012FC72E333A2F2E5F6BA7D39A22F89",
        "n_operation": 1
      },
      {
        "block": 92316,
        "account": 285630,
        "ophash":
            "9C680100BE5B04000A520900EFB5AA170F16CC10E9331F6B8F3691419526C4FE",
        "n_operation": 610826
      },
      {
        "block": 69833,
        "account": 285630,
        "ophash":
            "C9100100BE5B0400EC990200C3363791247BFB0C7B64CDDB02CB4B6D19B77A5D",
        "n_operation": 170476
      },
      {
        "block": 182100,
        "account": 571630,
        "ophash":
            "54C70200EEB80800B8120000AA1FB338DB758A398FBD8B9E530A5C75C60A9642",
        "n_operation": 4792
      },
      {
        "block": 119781,
        "account": 285630,
        "ophash":
            "E5D30100BE5B0400ECB31600092B0C0DC80C987C3287F52922F588D13B06D524",
        "n_operation": 1487852
      },
      {
        "block": 59197,
        "account": 285630,
        "ophash":
            "3DE70000BE5B04002B5300005E442F705D46FCDCF1C6DA0B3AB89893A6C267EA",
        "n_operation": 21291
      },
      {
        "block": 268256,
        "account": 1340715,
        "ophash":
            "E01704002B7514000100000003DF8C5971A7C3DBDB8194AE1F1937E7FEB05AE2",
        "n_operation": 1
      },
      {
        "block": 119588,
        "account": 285630,
        "ophash":
            "24D30100BE5B04001F90160001A4ADC7979B8B11798EC72302FB8992AC8278E2",
        "n_operation": 1478687
      },
      {
        "block": 275256,
        "account": 483701,
        "ophash":
            "38330400756107000B000000A2C9952B9A725622F66C6AD26001CAECD20ADEF2",
        "n_operation": 11
      },
      {
        "block": 295846,
        "account": 1478690,
        "ophash":
            "A68304002290160001000000B8845A89C5FFE01B8BC806F47980B24C84E3EBFF",
        "n_operation": 1
      },
      {
        "block": 88143,
        "account": 285630,
        "ophash":
            "4F580100BE5B0400203008001E41B1A7E08341B645BE3A7DB3EC1A04D1633673",
        "n_operation": 536608
      },
      {
        "block": 116187,
        "account": 70774,
        "ophash":
            "DBC501007614010004000000E939F3E20045A38113F8040614E26AE1E388A0DA",
        "n_operation": 4
      },
      {
        "block": 147338,
        "account": 285630,
        "ophash":
            "8A3F0200BE5B0400431828009DC33A5111FAFCE9C63FB30971BDF1F2A442E9C6",
        "n_operation": 2627651
      },
      {
        "block": 264506,
        "account": 285630,
        "ophash":
            "3A090400BE5B04004BAA4C003B6ACCC60739BF8915B84267155B84000512C74C",
        "n_operation": 5024331
      },
      {
        "block": 89496,
        "account": 285630,
        "ophash":
            "985D0100BE5B0400A88908006C4FDCC30B28CDD0F8A3CB0D1FC9D69C20734E10",
        "n_operation": 559528
      },
      {
        "block": 237753,
        "account": 1188235,
        "ophash":
            "B9A003008B21120001000000CCD3F800977A406F629206ED16929C476B5A8C42",
        "n_operation": 1
      },
      {
        "block": 168770,
        "account": 843315,
        "ophash":
            "4293020033DE0C0001000000D9A909CB5CF75BFBE718BE7896092FE924459192",
        "n_operation": 1
      },
      {
        "block": 88317,
        "account": 285630,
        "ophash":
            "FD580100BE5B0400D73A0800731C05374C05BD6D07748DFE4A71777E8272E112",
        "n_operation": 539351
      },
      {
        "block": 197918,
        "account": 938265,
        "ophash":
            "1E05030019510E002A000000C3F3B87DF88A68EB72590EE76A3D828C4DA9529D",
        "n_operation": 42
      },
      {
        "block": 65299,
        "account": 290760,
        "ophash":
            "13FF0000C86F04003B540000B68A5CD3955E1FC16887F85B6D0B5FA9257441BF",
        "n_operation": 21563
      },
      {
        "block": 144301,
        "account": 285630,
        "ophash":
            "AD330200BE5B0400AC2E2600A9B21C7E856520B1627CA1E59712C3463771741F",
        "n_operation": 2502316
      },
      {
        "block": 163042,
        "account": 457633,
        "ophash":
            "E27C0200A1FB060007000000CBEBB1D39BE47B65ABAE8CABCC9C24D9F7D1A167",
        "n_operation": 7
      },
      {
        "block": 159340,
        "account": 212687,
        "ophash":
            "6C6E0200CF3E0300030000006065F903E3714367BEAA33E101A2C2131CFB3419",
        "n_operation": 3
      },
      {
        "block": 297766,
        "account": 1487745,
        "ophash":
            "268B040081B3160001000000B5181A3AD8D7FC8EF903ED1787CF180722DECEE8",
        "n_operation": 1
      },
      {
        "block": 159991,
        "account": 799420,
        "ophash":
            "F7700200BC320C0001000000DBE293BE0A6A5D66CB264214E9BA0A32FF6B21A0",
        "n_operation": 1
      },
      {
        "block": 252144,
        "account": 1260170,
        "ophash":
            "F0D803008A3A130001000000290437E01599FCACF44246F044D6D3AD4260C226",
        "n_operation": 1
      },
      {
        "block": 49666,
        "account": 247820,
        "ophash":
            "02C200000CC8030001000000D0C66F0FFF7CAA838906EC000717B422B8EDACB2",
        "n_operation": 1
      },
      {
        "block": 155963,
        "account": 86646,
        "ophash":
            "3B6102007652010087090000C97E5287D7CF0E2E14906A63BE47DEB775238848",
        "n_operation": 2439
      },
      {
        "block": 107024,
        "account": 534555,
        "ophash":
            "10A201001B28080001000000CF960DB1DCBFA35BBF5D110021C28250AA6836A2",
        "n_operation": 1
      },
      {
        "block": 69514,
        "account": 285630,
        "ophash":
            "8A0F0100BE5B0400E27A0200E9252F5BF86CDCC2F964BA55A58A1D32C3DB1903",
        "n_operation": 162530
      },
      {
        "block": 64962,
        "account": 290760,
        "ophash":
            "C2FD0000C86F0400D2500000612E12A6BCB1811C20B1E2B3178EBEE45F5D9089",
        "n_operation": 20690
      },
      {
        "block": 110834,
        "account": 285630,
        "ophash":
            "F2B00100BE5B040063E61000D9E0F40F4804DBB8113BADDBADA5F4734BC2DFD4",
        "n_operation": 1107555
      },
      {
        "block": 134370,
        "account": 671300,
        "ophash":
            "E20C0200443E0A0001000000BE4E144FA1514BC947F8406B80A59F6E923D106D",
        "n_operation": 1
      },
      {
        "block": 205790,
        "account": 1028395,
        "ophash":
            "DE2303002BB10F000100000070E21C5BE29651683A199D95C76948BD7C291002",
        "n_operation": 1
      },
      {
        "block": 70526,
        "account": 285630,
        "ophash":
            "7E130100BE5B040043D3020009F831B6224C4B9FA7786C8139987E6D575BD4E7",
        "n_operation": 185155
      },
      {
        "block": 86270,
        "account": 297299,
        "ophash":
            "FE5001005389040043000000486E48648677C5CCD614A190E42C7E00653EE643",
        "n_operation": 67
      },
      {
        "block": 97555,
        "account": 285630,
        "ophash":
            "137D0100BE5B0400EF0F0B00224A0A1EC53FA14DE5D99EF72D05650A4EFC60BD",
        "n_operation": 724975
      },
      {
        "block": 189604,
        "account": 318107,
        "ophash":
            "A4E402009BDA04000300000079D23235E1C6C9AEC384C1A18D9878767834D9B7",
        "n_operation": 3
      },
      {
        "block": 62520,
        "account": 290760,
        "ophash":
            "38F40000C86F0400763A0000A7C0692153ACD74ABBF1E05B47B09F5215A10564",
        "n_operation": 14966
      },
      {
        "block": 261135,
        "account": 571630,
        "ophash":
            "0FFC0300EEB80800513200009197579C27AE1C3B39021D8DFAA289E3A5C7F5A4",
        "n_operation": 12881
      },
      {
        "block": 128593,
        "account": 578210,
        "ophash":
            "51F60100A2D2080052000000C301F09A894ADADD542D34B73D0CE61DFB4132E4",
        "n_operation": 82
      },
      {
        "block": 206477,
        "account": 1031810,
        "ophash":
            "8D26030082BE0F00010000007F55D6FD6ABC4442C74D09678837D715FFA26A2B",
        "n_operation": 1
      },
      {
        "block": 94284,
        "account": 470855,
        "ophash":
            "4C700100472F0700010000009B5239CC500603CD0C99A9CCC37AC990874FF602",
        "n_operation": 1
      },
      {
        "block": 152347,
        "account": 285630,
        "ophash":
            "1B530200BE5B0400948F2A00E9593F079298E422302235AC8A461E3344BAD0F2",
        "n_operation": 2789268
      },
      {
        "block": 50201,
        "account": 248440,
        "ophash":
            "19C4000078CA0300010000002E38F96D9561879E6B1151D69CF430A122F4D875",
        "n_operation": 1
      },
      {
        "block": 192157,
        "account": 472756,
        "ophash":
            "9DEE0200B43607000900000084C3A39A121540ADBF8B489DEB0964D59F629811",
        "n_operation": 9
      },
      {
        "block": 179477,
        "account": 571630,
        "ophash":
            "15BD0200EEB808001311000087254B22148BB741D877F0016CEB9A18AADDDFBF",
        "n_operation": 4371
      },
      {
        "block": 154672,
        "account": 771725,
        "ophash":
            "305C02008DC60B0001000000D3BC67E41A2F9B9F7C1EC63438F9DCEB7B8F410C",
        "n_operation": 1
      },
      {
        "block": 65032,
        "account": 285630,
        "ophash":
            "08FE0000BE5B040037550100723CC655A898F4F92D989052AC2A513AAC45E9AE",
        "n_operation": 87351
      },
      {
        "block": 91006,
        "account": 285630,
        "ophash":
            "7E630100BE5B0400DBF7080084A33E582DC1A195365B4A71021EF36A0BFED18A",
        "n_operation": 587739
      },
      {
        "block": 116194,
        "account": 285630,
        "ophash":
            "E2C50100BE5B0400810B1400EA6C29DF1F9228F934FBB5F45780D15F1502CA41",
        "n_operation": 1313665
      },
      {
        "block": 228663,
        "account": 546929,
        "ophash":
            "377D03007158080002000000A59958FC58040A575B466E39F7A14288B146848C",
        "n_operation": 2
      },
      {
        "block": 267909,
        "account": 1320421,
        "ophash":
            "85160400E5251400030000001AEA6931AF59BAD86C44BA32AD1572D95AF23E9F",
        "n_operation": 3
      },
      {
        "block": 239604,
        "account": 1197495,
        "ophash":
            "F4A70300B745120001000000AC4B2B944EF28E1FD3DE0302487CFF1A7636F4A7",
        "n_operation": 1
      },
      {
        "block": 265475,
        "account": 7392,
        "ophash":
            "030D0400E01C000001000000F857D53720A011CE7D4A57C7AF5EF3DF4E12A806",
        "n_operation": 1
      },
      {
        "block": 94908,
        "account": 473950,
        "ophash":
            "BC7201005E3B070001000000CDA178235153D2E1866E252EF4BAD9E43287D43D",
        "n_operation": 1
      },
      {
        "block": 295227,
        "account": 1475610,
        "ophash":
            "3B8104001A84160001000000BDC24EF12DC7673637DC6E8AD59DE093687F6053",
        "n_operation": 1
      },
      {
        "block": 176134,
        "account": 285630,
        "ophash":
            "06B00200BE5B0400679C3700BA0BCFB7588CEBB49603F01CF7DD52EDCE829953",
        "n_operation": 3644519
      },
      {
        "block": 159607,
        "account": 797460,
        "ophash":
            "776F0200142B0C000100000013A6A9EC6091A512E4C2C5C05033B16F86A93D1C",
        "n_operation": 1
      },
      {
        "block": 185340,
        "account": 926135,
        "ophash":
            "FCD30200B7210E000100000042C2A7A0FE0F6C3C27E49735E83D5AB5B24A656C",
        "n_operation": 1
      },
      {
        "block": 163329,
        "account": 285630,
        "ophash":
            "017E0200BE5B0400D2753000B3727717A58DF9E79FE366DEA5CA649B3F8CCF31",
        "n_operation": 3175890
      },
      {
        "block": 98630,
        "account": 285630,
        "ophash":
            "46810100BE5B040016720B00D987CC04AA6C1A8530B836D4063F8E63500DF50C",
        "n_operation": 750102
      },
      {
        "block": 205457,
        "account": 1026735,
        "ophash":
            "91220300AFAA0F0001000000BDB4470963FFAB86091D060519DF97377BCD365E",
        "n_operation": 1
      },
      {
        "block": 116182,
        "account": 285630,
        "ophash":
            "D6C50100BE5B0400690814002E490DB838CAD4ACC3955F00E5E6FE6C8087FAB0",
        "n_operation": 1312873
      },
      {
        "block": 163021,
        "account": 814580,
        "ophash":
            "CD7C0200F46D0C00010000009284512CED659B3F51E43D5E7B115F44FFB47C6B",
        "n_operation": 1
      },
      {
        "block": 163880,
        "account": 818850,
        "ophash":
            "28800200A27E0C00010000001065306434DF1B00C31B40E5504D5C78DD5EF75B",
        "n_operation": 1
      },
      {
        "block": 154370,
        "account": 86646,
        "ophash":
            "025B020076520100310900001E063016FF437F1AF900AE21CBC7ED73D6A76639",
        "n_operation": 2353
      },
      {
        "block": 164852,
        "account": 285630,
        "ophash":
            "F4830200BE5B0400C7333100B92376BC9DC10571660C5C6FD743E20FFE60C3AE",
        "n_operation": 3224519
      },
      {
        "block": 92903,
        "account": 463930,
        "ophash":
            "E76A01003A140700010000001AAD9B96070AC1D5D23E5C3140BE5C102897F753",
        "n_operation": 1
      },
      {
        "block": 61408,
        "account": 285630,
        "ophash":
            "E0EF0000BE5B040070BB0000BDA87567EA0E4E3C84E634CED6DA7ED5F57F35EA",
        "n_operation": 47984
      },
      {
        "block": 149583,
        "account": 285630,
        "ophash":
            "4F480200BE5B040064412900F63B430304A4CAC7F32ABB158C4657408C94A2B4",
        "n_operation": 2703716
      },
      {
        "block": 197244,
        "account": 571630,
        "ophash":
            "7C020300EEB808005A1E000090938ED64CDF6D9FB3A9B9BFA1E3041A8296BFEB",
        "n_operation": 7770
      },
      {
        "block": 168244,
        "account": 571630,
        "ophash":
            "34910200EEB80800E60B00008FD44358EDBF4E750DEBF00CE3757D925A926BB5",
        "n_operation": 3046
      },
      {
        "block": 127913,
        "account": 578210,
        "ophash":
            "A9F30100A2D208004700000099D1726DC51C41122364913F05C9557A5E9387C5",
        "n_operation": 71
      },
      {
        "block": 102490,
        "account": 285630,
        "ophash":
            "5A900100BE5B04008CBA0C0080832BA660D35DAA07F9A17BDA611FCB0D6093B9",
        "n_operation": 834188
      },
      {
        "block": 67565,
        "account": 285630,
        "ophash":
            "ED070100BE5B04009AD10100868662E4DDD3662E12CBDBB88A425D08CAEF288C",
        "n_operation": 119194
      },
      {
        "block": 92013,
        "account": 89846,
        "ophash":
            "6D670100F65E010001000000B26E49E35C5DE824B2C25E11A7A97B7DC4C370C6",
        "n_operation": 1
      },
      {
        "block": 72700,
        "account": 285630,
        "ophash":
            "FC1B0100BE5B0400B09E03006215E2FE7E85C66072712FB6CEA252325F1D9E2C",
        "n_operation": 237232
      },
      {
        "block": 112236,
        "account": 285630,
        "ophash":
            "6CB60100BE5B0400CFA71100F03E23CE320C70D5D1B896A36612F6672827A5B6",
        "n_operation": 1157071
      },
      {
        "block": 63842,
        "account": 290760,
        "ophash":
            "62F90000C86F0400484600005DC3E97D64D5E94236E37E5C256C9F7D346ABCEC",
        "n_operation": 17992
      },
      {
        "block": 108833,
        "account": 309655,
        "ophash":
            "21A9010097B9040003000000832F6D8B98B470C2815385C0204C19D1493E4289",
        "n_operation": 3
      },
      {
        "block": 56428,
        "account": 185097,
        "ophash":
            "6CDC000009D3020004000000E1A28CF520A3353393E99B4F64D0F301BFB2781F",
        "n_operation": 4
      },
      {
        "block": 126627,
        "account": 285630,
        "ophash":
            "A3EE0100BE5B04000E6C1B00350402B06FFEBFAC08A90107161FF23DDD55B0CD",
        "n_operation": 1797134
      },
      {
        "block": 281328,
        "account": 71707,
        "ophash":
            "F04A04001B1801001A00000093BFEA33BF4330D30FBA1A27DED7A22BA492D1E3",
        "n_operation": 26
      },
      {
        "block": 233179,
        "account": 1165360,
        "ophash":
            "DB8E030030C8110001000000AAA410BF5CB38188C6CFD3598E0E8B7A7DAD661A",
        "n_operation": 1
      },
      {
        "block": 263651,
        "account": 499016,
        "ophash":
            "E3050400489D070006000000BDECA36BC113DA1CB3B279C13ADC6B53C6BC9EAD",
        "n_operation": 6
      },
      {
        "block": 197326,
        "account": 67050,
        "ophash":
            "CE020300EA0501005E01000088E5F0620921D6A735922AE125A83EF5F241204B",
        "n_operation": 350
      },
      {
        "block": 138016,
        "account": 689555,
        "ophash":
            "201B020093850A0001000000C6EE7D2559CCFC7011370CA974DD7136A1D9F324",
        "n_operation": 1
      },
      {
        "block": 155398,
        "account": 86646,
        "ophash":
            "065F020076520100660900002E0A2F9BCC6940F7D39DFE2736E5E7F72DE2B33C",
        "n_operation": 2406
      },
      {
        "block": 263982,
        "account": 1317355,
        "ophash":
            "2E070400EB1914000100000051E696095A43277D76B49E9C2E59E43D146F465B",
        "n_operation": 1
      },
      {
        "block": 79367,
        "account": 396275,
        "ophash":
            "07360100F30B060001000000D7ABF325E29B2FC32D41242DB993EFCA6995F4F1",
        "n_operation": 1
      },
      {
        "block": 114796,
        "account": 573450,
        "ophash":
            "6CC001000AC0080001000000561461B4B298B227956E8BDCB3483E5ECB02AB86",
        "n_operation": 1
      },
      {
        "block": 234256,
        "account": 571630,
        "ophash":
            "10930300EEB80800112E000064F4A6A734D122E686C3C544E4FC2F0D59B9784C",
        "n_operation": 11793
      },
      {
        "block": 95546,
        "account": 285630,
        "ophash":
            "3A750100BE5B0400176F0A0091D95FBC910AECF652417B8B9312540FE9F5EB59",
        "n_operation": 683799
      },
      {
        "block": 204327,
        "account": 1021110,
        "ophash":
            "271E0300B6940F00010000000EB0E6D33101A92D62616772FA7D94DD65A6E126",
        "n_operation": 1
      },
      {
        "block": 121480,
        "account": 606875,
        "ophash":
            "88DA01009B420900010000008440E94A63EE6DA806F1A96749F45D95BAC9C6B0",
        "n_operation": 1
      },
      {
        "block": 276432,
        "account": 1381625,
        "ophash":
            "D0370400F91415000100000078A65DB47117A558C72097ED5D886AE5D1200D99",
        "n_operation": 1
      },
      {
        "block": 231847,
        "account": 86646,
        "ophash":
            "A78903007652010069160000524F93B8F669FB7DDE1A6F226AA7FE29427E8601",
        "n_operation": 5737
      },
      {
        "block": 224532,
        "account": 1122115,
        "ophash":
            "146D0300431F1100010000000D81AB49CBF8317CC85985151E693D228C57668F",
        "n_operation": 1
      },
      {
        "block": 62583,
        "account": 290760,
        "ophash":
            "77F40000C86F04002F3B000049826B2D0F92083D6EB9E8DBF686FC8211E9BF5D",
        "n_operation": 15151
      },
      {
        "block": 221164,
        "account": 571630,
        "ophash":
            "EC5F0300EEB80800312B0000F1E35F1EA9C068C6BBE5E0533251EB25D22F55F3",
        "n_operation": 11057
      },
      {
        "block": 56125,
        "account": 279195,
        "ophash":
            "3DDB00009B4204000100000086FB38FE7C6CDE50B184D969B99244E80B5A1421",
        "n_operation": 1
      },
      {
        "block": 283716,
        "account": 1418040,
        "ophash":
            "4454040038A3150001000000B7C9FCA42B0A0F04C3C91A3593B54F15217A6321",
        "n_operation": 1
      },
      {
        "block": 113898,
        "account": 285630,
        "ophash":
            "EABC0100BE5B04004CA612002E5DFFE6D0797AFE5059E4C9FBA78DA5C3BCB89C",
        "n_operation": 1222220
      },
      {
        "block": 129599,
        "account": 647465,
        "ophash":
            "3FFA010029E109000100000033A361367CC466C27D2A6286EE91CFCA02B93CDE",
        "n_operation": 1
      },
      {
        "block": 75734,
        "account": 285630,
        "ophash":
            "D6270100BE5B0400EB8D04009497D874F3A22BD540A953DDBAA3C03C772B44FA",
        "n_operation": 298475
      },
      {
        "block": 225746,
        "account": 1128190,
        "ophash":
            "D2710300FE36110001000000550296F81333B16FCCC5AA2565D1083B38585EB1",
        "n_operation": 1
      },
      {
        "block": 243342,
        "account": 1216145,
        "ophash":
            "8EB60300918E120001000000B4379D33E16E4A46D4876C9479F192C4ED064582",
        "n_operation": 1
      },
      {
        "block": 231112,
        "account": 1155015,
        "ophash":
            "C8860300C79F110001000000F0EFF94163165E934B5BB9A914DE13182DD7FABC",
        "n_operation": 1
      },
      {
        "block": 91589,
        "account": 285630,
        "ophash":
            "C5650100BE5B0400C22109007AFD9051858145A83863242C559A360CFF19B704",
        "n_operation": 598466
      },
      {
        "block": 62600,
        "account": 290760,
        "ophash":
            "88F40000C86F0400473B000011A477907C27F5FA69F93AF4095EBF4DDA659E70",
        "n_operation": 15175
      },
      {
        "block": 290251,
        "account": 1450725,
        "ophash":
            "CB6D0400E5221600010000009ED9B2DDF853C939E66A5AAC2A0EC6E037A00DDB",
        "n_operation": 1
      },
      {
        "block": 162641,
        "account": 812685,
        "ophash":
            "517B02008D660C00010000005FD3C7E557DD1B0F56CCF799FA0139578378ABD5",
        "n_operation": 1
      },
      {
        "block": 170175,
        "account": 86646,
        "ophash":
            "BF98020076520100580F0000087F22C3AAFC7F954F248883CE556BC72FC5A162",
        "n_operation": 3928
      },
      {
        "block": 72331,
        "account": 168537,
        "ophash":
            "8B1A010059920200F1000000F0034C8E42439074C11BE0BCA0CAD7FB24381185",
        "n_operation": 241
      },
      {
        "block": 153078,
        "account": 764865,
        "ophash":
            "F6550200C1AB0B00010000005F7D5B05F6AA061913050374AFFC825A03EF0C9D",
        "n_operation": 1
      },
      {
        "block": 62256,
        "account": 290760,
        "ophash":
            "30F30000C86F04007D3700008C76CB1B0DD5D3EF850F911942B0D7E6975FD1AE",
        "n_operation": 14205
      },
      {
        "block": 263860,
        "account": 285630,
        "ophash":
            "B4060400BE5B040075834C004F4B1D7144F262DA2BA35F7CBF7BB462A7999BD8",
        "n_operation": 5014389
      },
      {
        "block": 242385,
        "account": 571630,
        "ophash":
            "D1B20300EEB808004D2F0000DD8285C4B743104D51EA9CB7D77E3C7608D432DE",
        "n_operation": 12109
      },
      {
        "block": 227724,
        "account": 300124,
        "ophash":
            "8C7903005C9404005F310000F8FBC319D0CBEE46F69FC02DBF8FA4DDFC6DC8F9",
        "n_operation": 12639
      },
      {
        "block": 94833,
        "account": 473575,
        "ophash":
            "71720100E739070001000000AABDF06B4AA9CD0649B26860EB033077E13D0E10",
        "n_operation": 1
      },
      {
        "block": 76568,
        "account": 285630,
        "ophash":
            "182B0100BE5B0400A5D60400A467F1B92D619101904828AF64D7A3482AC422D3",
        "n_operation": 317093
      },
      {
        "block": 98123,
        "account": 489995,
        "ophash":
            "4B7F01000B7A070001000000E922A662DDF599F6D3E958374D32A1CC890695AD",
        "n_operation": 1
      },
      {
        "block": 266154,
        "account": 547523,
        "ophash":
            "AA0F0400C35A08002B0000005436E5A75F67E342DA0440A549A593184C168A60",
        "n_operation": 43
      },
      {
        "block": 199907,
        "account": 999005,
        "ophash":
            "E30C03005D3E0F0001000000C2582E93519F4F66008236F3B42C9FE489A624EC",
        "n_operation": 1
      },
      {
        "block": 101660,
        "account": 285630,
        "ophash":
            "1C8D0100BE5B0400D3700C00B810A8C3362E6BD47990D7827268E598D2C44EA2",
        "n_operation": 815315
      },
      {
        "block": 107444,
        "account": 285630,
        "ophash":
            "B4A30100BE5B0400140E0F00A90A70939676AB789C95E4B0B96334D77E7C6094",
        "n_operation": 986644
      },
      {
        "block": 114770,
        "account": 285630,
        "ophash":
            "52C00100BE5B040061E21200E5EDA6A775FC5D63FB910F2805F8C4501AAFD302",
        "n_operation": 1237601
      },
      {
        "block": 115478,
        "account": 576875,
        "ophash":
            "16C301006BCD080001000000FF13E97255F7EA3FDF4A3ECB91118BA07453C31C",
        "n_operation": 1
      },
      {
        "block": 277354,
        "account": 285630,
        "ophash":
            "6A3B0400BE5B0400DC054E00305C764D6B9FD5265CBF8EE0D530FEA6691D4CA3",
        "n_operation": 5113308
      },
      {
        "block": 189885,
        "account": 948880,
        "ophash":
            "BDE50200907A0E00010000000E9049747619AE445E71F17E47D4C2522C5BD11B",
        "n_operation": 1
      },
      {
        "block": 195398,
        "account": 976450,
        "ophash":
            "46FB020042E60E00010000008CED964A2B60934ED7C4F7DADE55EC70EEAEB714",
        "n_operation": 1
      },
      {
        "block": 96669,
        "account": 285630,
        "ophash":
            "9D790100BE5B0400EDC10A00DB9C7C0F4778F3F89E56055435EDCD4AD43262AC",
        "n_operation": 705005
      },
      {
        "block": 96102,
        "account": 479840,
        "ophash":
            "66770100605207000100000002761D06AC30715D7DA563E44B9CB86B403438AC",
        "n_operation": 1
      },
      {
        "block": 67166,
        "account": 86646,
        "ophash":
            "5E0601007652010005010000E90F6CD0EEF809A1697C4AAFAAA7F16731BC9523",
        "n_operation": 261
      },
      {
        "block": 149050,
        "account": 744725,
        "ophash":
            "3A460200155D0B00010000005C1FF3478ABD91A3E2D8BACD6FA0216AD5C2A373",
        "n_operation": 1
      },
      {
        "block": 221184,
        "account": 1105365,
        "ophash":
            "00600300D5DD1000010000006D8261676DC86BA08063CBF48D9F73E5F1D42157",
        "n_operation": 1
      },
      {
        "block": 84644,
        "account": 285630,
        "ophash":
            "A44A0100BE5B0400FE3407003734BC6CFE37BF0654C54006389D7DEA0275C8B1",
        "n_operation": 472318
      },
      {
        "block": 214369,
        "account": 1071315,
        "ophash":
            "61450300D358100001000000607613B22207D94684FA266A7265E453600EAF39",
        "n_operation": 1
      },
      {
        "block": 263872,
        "account": 112800,
        "ophash":
            "C0060400A0B801003B280000DA7359A7BAE3DA4989091ACFA2B2FBEB69D4A197",
        "n_operation": 10299
      },
      {
        "block": 218026,
        "account": 571630,
        "ophash":
            "AA530300EEB80800F02A00006F57F332B92ABB48AC4D10541F67460C7FCC56B8",
        "n_operation": 10992
      },
      {
        "block": 218372,
        "account": 1091340,
        "ophash":
            "045503000CA7100001000000B5EF7823A26DC2D5D52D11ACC04A8724E3DE5A74",
        "n_operation": 1
      },
      {
        "block": 149825,
        "account": 748595,
        "ophash":
            "41490200336C0B00010000003027D8DB576B3353245FDC8B4AAE9FE1C9F539DA",
        "n_operation": 1
      },
      {
        "block": 139167,
        "account": 695290,
        "ophash":
            "9F1F0200FA9B0A00010000002D1DD2D1A8ACEDDD9DACBE30211C21B5975D9D9C",
        "n_operation": 1
      },
      {
        "block": 282235,
        "account": 285630,
        "ophash":
            "7B4E0400BE5B0400235B4E0083B08A25E16721A98D84355F1B8736BDEBBF067F",
        "n_operation": 5135139
      },
      {
        "block": 222412,
        "account": 546194,
        "ophash":
            "CC64030092550800040000003115A39A5B4644E4BE62AB29B81B545C92E78219",
        "n_operation": 4
      },
      {
        "block": 257700,
        "account": 1287970,
        "ophash":
            "A4EE030022A7130001000000491876A47BCE43F6CA872CB05B8693FD739E5FC4",
        "n_operation": 1
      },
      {
        "block": 196343,
        "account": 571630,
        "ophash":
            "F7FE0200EEB80800741D00001A36BF7B5F135DDD191E71468018350F63E53C8C",
        "n_operation": 7540
      },
      {
        "block": 184032,
        "account": 86646,
        "ophash":
            "E0CE02007652010099120000A1268F8CD79065D0E10636CC1B2E21117D8F6258",
        "n_operation": 4761
      },
      {
        "block": 227068,
        "account": 1134780,
        "ophash":
            "FC760300BC5011000100000075503526DDF8EB8A6B22C086D7A5EC604A3DAFEB",
        "n_operation": 1
      },
      {
        "block": 284439,
        "account": 473232,
        "ophash":
            "17570400903807000200000017101A73BA408C79C915FED32DEDFBF95415E557",
        "n_operation": 2
      },
      {
        "block": 70442,
        "account": 285630,
        "ophash":
            "2A130100BE5B040077CB0200A582018F506FF3EBAE3E98BB40AEDC8544F1EF65",
        "n_operation": 183159
      },
      {
        "block": 63469,
        "account": 160435,
        "ophash":
            "EDF70000B372020002000000AFA04464713E97E2903105CA0349602CB5940220",
        "n_operation": 2
      },
      {
        "block": 28139,
        "account": 50001,
        "ophash":
            "EB6D000051C3000001000000D5DEBFB7FF40A3BA8B5089EA1FB53CCD5E2A0FDF",
        "n_operation": 1
      },
      {
        "block": 191507,
        "account": 957020,
        "ophash":
            "13EC02005C9A0E00010000000EB42E4161F386D9110BDC8566E0D138274E56BC",
        "n_operation": 1
      },
      {
        "block": 211254,
        "account": 566847,
        "ophash":
            "363903003FA608000600000024399D9822F02038E594161750115F5CC36E2562",
        "n_operation": 6
      },
      {
        "block": 70318,
        "account": 290760,
        "ophash":
            "AE120100C86F04008073000052D4400A2A64DE35ABC09B0111688260ACE4014D",
        "n_operation": 29568
      },
      {
        "block": 133467,
        "account": 666810,
        "ophash":
            "5B090200BA2C0A000100000080B6362F883A83B130D09D667F07B6E0FC3CF6ED",
        "n_operation": 1
      },
      {
        "block": 158337,
        "account": 791170,
        "ophash":
            "816A020082120C000100000069E60889277ACDB9C82803341D3148B3DE69F460",
        "n_operation": 1
      },
      {
        "block": 21526,
        "account": 106725,
        "ophash":
            "16540000E5A00100020000006A5FCF4C3EAEA5262DF491ABBF43F2C6E40656A4",
        "n_operation": 2
      },
      {
        "block": 124128,
        "account": 285630,
        "ophash":
            "E0E40100BE5B040037B41900807460DCBB7545F345A484A3DC0AD823C489C227",
        "n_operation": 1684535
      },
      {
        "block": 63396,
        "account": 285630,
        "ophash":
            "A4F70000BE5B0400641B010000D60319FDCF10E4CB051592A6093DED13C5D503",
        "n_operation": 72548
      },
      {
        "block": 38484,
        "account": 188120,
        "ophash":
            "54960000D8DE0200010000006B43B91F8F83349F847D3CD8CB114EAD78D19C0F",
        "n_operation": 1
      },
      {
        "block": 96391,
        "account": 86646,
        "ophash":
            "8778010076520100C20200009E14530649B0AFD91352FF01A9A47E6024FE67FB",
        "n_operation": 706
      },
      {
        "block": 44457,
        "account": 122520,
        "ophash":
            "A9AD000098DE010003000000113BE910DA846B06A99A87A6A313BC272F520A84",
        "n_operation": 3
      },
      {
        "block": 70983,
        "account": 168539,
        "ophash":
            "471501005B920200200000007BCB357D95D4B6BB00E7909BA3B5ADA301F71A19",
        "n_operation": 32
      },
      {
        "block": 62014,
        "account": 290760,
        "ophash":
            "3EF20000C86F0400CC330000E7CEF1A1ED74517DFB442CDE4B70620A381B9715",
        "n_operation": 13260
      },
      {
        "block": 204142,
        "account": 1020195,
        "ophash":
            "6E1D030023910F0001000000B7425175FD1082E5FBEBB968E6EBF998A641B716",
        "n_operation": 1
      },
      {
        "block": 192116,
        "account": 582004,
        "ophash":
            "74EE020074E10800020000000E4AD4A0A6645819B33ACE153629249D9ADD7253",
        "n_operation": 2
      },
      {
        "block": 103375,
        "account": 285630,
        "ophash":
            "CF930100BE5B0400130A0D00DECCCD5E689707AAC39B1FBF2182438839F694DC",
        "n_operation": 854547
      },
      {
        "block": 90560,
        "account": 296330,
        "ophash":
            "C06101008A8504000D0000004319B9D0E86F6D156A6083D8F8F1C5EEC0FECD0F",
        "n_operation": 13
      },
      {
        "block": 88451,
        "account": 285630,
        "ophash":
            "83590100BE5B040006440800C8FA00E867719E5D818542C7E3F7945EFC8D40F7",
        "n_operation": 541702
      },
      {
        "block": 129136,
        "account": 285630,
        "ophash":
            "70F80100BE5B0400041A1D00926C7DCBCAFC15234DE9DAF2BAC29D4030B17865",
        "n_operation": 1907204
      },
      {
        "block": 102172,
        "account": 285630,
        "ophash":
            "1C8F0100BE5B0400AF9D0C00AAA5322EFF2B135D872343CE3CE3AE8BFEDE252A",
        "n_operation": 826799
      },
      {
        "block": 4715,
        "account": 22565,
        "ophash":
            "6B1200002558000001000000D611C8913430195FA7D358DA9DCC1CF693B4D8AE",
        "n_operation": 1
      },
      {
        "block": 67631,
        "account": 290760,
        "ophash":
            "2F080100C86F0400046500001FC27BD6620BBFB4D95C2C85D368FBB900EB5986",
        "n_operation": 25860
      },
      {
        "block": 193441,
        "account": 571630,
        "ophash":
            "A1F30200EEB808000E1B0000F2EC2FBC1EEC72B06699684451B75CE69EAD380B",
        "n_operation": 6926
      },
      {
        "block": 276017,
        "account": 1379530,
        "ophash":
            "31360400CA0C1500010000002F413BA60C48F81C1F0B6B3E4FA5B865CBE8F850",
        "n_operation": 1
      },
      {
        "block": 269593,
        "account": 1347435,
        "ophash":
            "191D04006B8F14000100000077440ABA0F3284EBC1A93F044614606C2B6797F5",
        "n_operation": 1
      },
      {
        "block": 252748,
        "account": 1263180,
        "ophash":
            "4CDB03004C46130001000000A22A2793C4C9B5603A83F0F7A7B142C88CA57FDE",
        "n_operation": 1
      },
      {
        "block": 73819,
        "account": 168610,
        "ophash":
            "5B200100A292020016010000F0ADF4028A4107BAB52B9EA1D3A4DE8134FBC94C",
        "n_operation": 278
      },
      {
        "block": 145148,
        "account": 86646,
        "ophash":
            "FC360200765201006708000043553447B286FEBFC88AEA2DB72AE0448A613B4D",
        "n_operation": 2151
      },
      {
        "block": 105811,
        "account": 285630,
        "ophash":
            "539D0100BE5B0400F6390E001E9FC886DD7EFF20C1D8F7987732F4CA4634F629",
        "n_operation": 932342
      },
      {
        "block": 82043,
        "account": 285630,
        "ophash":
            "7B400100BE5B04001E8506005D7011285E996315A6494FD83E15F57C3992205B",
        "n_operation": 427294
      },
      {
        "block": 145069,
        "account": 285630,
        "ophash":
            "AD360200BE5B0400DBCA2600A5F3C213E23AE4BADF8E8AAB334026FC643B075D",
        "n_operation": 2542299
      },
      {
        "block": 133644,
        "account": 285630,
        "ophash":
            "0C0A0200BE5B040015E01F0023956D81B71FDB697B93A3A17D9DB33374093657",
        "n_operation": 2088981
      },
      {
        "block": 98911,
        "account": 285630,
        "ophash":
            "5F820100BE5B0400058D0B00BC475738C83916139E226FDAB8A6DAD297065445",
        "n_operation": 756997
      },
      {
        "block": 134216,
        "account": 670560,
        "ophash":
            "480C0200603B0A000100000055E131DF83F077AD4824543EC07008087F528F98",
        "n_operation": 1
      },
      {
        "block": 114609,
        "account": 285630,
        "ophash":
            "B1BF0100BE5B0400BFBE120036CFDF39BE75659E358AF1994F8A76B8FF2558CB",
        "n_operation": 1228479
      },
      {
        "block": 249844,
        "account": 1248660,
        "ophash":
            "F4CF0300940D130001000000D4F17CEA90152E33B376E67DDDA5D3D5FD339DC4",
        "n_operation": 1
      },
      {
        "block": 97888,
        "account": 86646,
        "ophash":
            "607E010076520100DF020000EFFCABAD5705F7D0E177FAAEAD1B783CB2FC668B",
        "n_operation": 735
      },
      {
        "block": 196472,
        "account": 571630,
        "ophash":
            "78FF0200EEB80800951D0000C3ADD86C8BFE47D592CD2F091CF4AC1E0BAF0B5A",
        "n_operation": 7573
      },
      {
        "block": 102366,
        "account": 285630,
        "ophash":
            "DE8F0100BE5B040089B00C002D240A62C802397A9E8A29BE57473C1F2C025D3F",
        "n_operation": 831625
      },
      {
        "block": 139485,
        "account": 696890,
        "ophash":
            "DD2002003AA20A0001000000A945DEEA6995ABAC819387555C886076259AF471",
        "n_operation": 1
      },
      {
        "block": 117719,
        "account": 588085,
        "ophash":
            "D7CB010035F9080001000000A8CFF36119F1135111722019E1AFEAC619FFD708",
        "n_operation": 1
      },
      {
        "block": 264398,
        "account": 1321445,
        "ophash":
            "CE080400E529140001000000240C3F41ABF23BAF63EF7EA81FFDCC991235D636",
        "n_operation": 1
      },
      {
        "block": 243776,
        "account": 1218330,
        "ophash":
            "40B803001A9712000100000046831599044268F7161D28654A94C4F7B15AB405",
        "n_operation": 1
      },
      {
        "block": 250713,
        "account": 105569,
        "ophash":
            "59D30300619C01001C00000020C59C9780389B5CB0D7C5120CD0E200EBE2CBD6",
        "n_operation": 28
      },
      {
        "block": 210274,
        "account": 571630,
        "ophash":
            "62350300EEB80800C6290000ADABAFEC2E31FC6131DF4E8B2E6D47D02EB747F4",
        "n_operation": 10694
      },
      {
        "block": 76653,
        "account": 9001,
        "ophash":
            "6D2B0100292300000800000042F55CF4771FE3C0C28029F7EEE707547026FBE2",
        "n_operation": 8
      },
      {
        "block": 91195,
        "account": 285630,
        "ophash":
            "3B640100BE5B0400CD0509005FD9DEC03856EED6C7C01291C451D347FA1EBB68",
        "n_operation": 591309
      },
      {
        "block": 300026,
        "account": 483689,
        "ophash":
            "FA9304006961070098010000BD1C9A5C6911533981830690E81D26A4BA5D92F1",
        "n_operation": 408
      },
      {
        "block": 129203,
        "account": 48210,
        "ophash":
            "B3F8010052BC00000100000099EC1491FAD22A7F29A608DF19E83D0064B1B96B",
        "n_operation": 1
      },
      {
        "block": 198357,
        "account": 86646,
        "ophash":
            "D50603007652010037140000C5211E1D130F0117CB1D9A467253579F1563ECD0",
        "n_operation": 5175
      },
      {
        "block": 76456,
        "account": 285630,
        "ophash":
            "A82A0100BE5B040011CC0400AC70B24A9889B1A38049428BCF4335CA7B118B7E",
        "n_operation": 314385
      },
      {
        "block": 4484,
        "account": 21540,
        "ophash":
            "841100002454000001000000B5898E33AED0D84BB57C8BD5844D7A3F0F4AFFD8",
        "n_operation": 1
      },
      {
        "block": 64710,
        "account": 290760,
        "ophash":
            "C6FC0000C86F0400964E0000F9336CEC5AA500D4A343DB170F11D9537DA9EABF",
        "n_operation": 20118
      },
      {
        "block": 192550,
        "account": 962215,
        "ophash":
            "26F00200A7AE0E00010000001DCB510074E146A4B5562CE00ACBF7EE9D1510E4",
        "n_operation": 1
      },
      {
        "block": 7017,
        "account": 12540,
        "ophash":
            "691B0000FC300000010000005155F3B2A5D7E27813EE6AF505C7683F6FBBB8CB",
        "n_operation": 1
      },
      {
        "block": 127235,
        "account": 635655,
        "ophash":
            "03F1010007B3090001000000BDD05399FFDE66BA9B202CE4C1E997B0F9F7B82D",
        "n_operation": 1
      },
      {
        "block": 143444,
        "account": 291000,
        "ophash":
            "54300200B87004005400000014D3164D0CA6A9F4904BB3C0FC0BA61A70662CE3",
        "n_operation": 84
      },
      {
        "block": 159592,
        "account": 285630,
        "ophash":
            "686F0200BE5B0400702B2E00A22FFF99429B4694B00B251454AEEE23D02A264F",
        "n_operation": 3025776
      },
      {
        "block": 98984,
        "account": 285630,
        "ophash":
            "A8820100BE5B040066930B000D3D119BFF19C45087DF26E7D679E64CB4202D64",
        "n_operation": 758630
      },
      {
        "block": 239387,
        "account": 106975,
        "ophash":
            "1BA70300DFA1010006000000B0234671746239D46CA10C6E0EF7EAD1E048A30A",
        "n_operation": 6
      },
      {
        "block": 90238,
        "account": 285630,
        "ophash":
            "7E600100BE5B0400BFBF0800E29B0C8B5866680FFBE6F8C29031FFA8BF8BDEBC",
        "n_operation": 573375
      },
      {
        "block": 66054,
        "account": 290760,
        "ophash":
            "06020100C86F0400FB5A0000C3A9CCE5D081DD87646BB16CA0BA692F58C558B7",
        "n_operation": 23291
      },
      {
        "block": 120992,
        "account": 604425,
        "ophash":
            "A0D801000939090001000000DEF3964051C78F42C0A9953CE54C03A57F0D27F6",
        "n_operation": 1
      },
      {
        "block": 105817,
        "account": 285630,
        "ophash":
            "599D0100BE5B04005A3A0E004E2E8A066A5142A377F80C8699C81851E7023A02",
        "n_operation": 932442
      },
      {
        "block": 44739,
        "account": 220475,
        "ophash":
            "C3AE00003B5D0300010000006003F373E9DF71C67C9D15B1D226546183C59F9B",
        "n_operation": 1
      },
      {
        "block": 110779,
        "account": 285630,
        "ophash":
            "BBB00100BE5B040017DC1000A403B4806ADE4D790DC89E16902D2F8A873C1DF7",
        "n_operation": 1104919
      },
      {
        "block": 156193,
        "account": 200119,
        "ophash":
            "21620200B70D030006000000D6A1124EDA5E4B64C513115762F3A3002BE376E4",
        "n_operation": 6
      },
      {
        "block": 165231,
        "account": 55065,
        "ophash":
            "6F85020019D70000030000006AE1AAE990DBA46C0673CC8E53DE9888B023DF53",
        "n_operation": 3
      },
      {
        "block": 186362,
        "account": 931290,
        "ophash":
            "FAD70200DA350E0001000000549B1A5CED2763EDA588CE3498CBA6BF6266B4D6",
        "n_operation": 1
      },
      {
        "block": 111519,
        "account": 285630,
        "ophash":
            "9FB30100BE5B0400FF4A11006411EEAA47DCF324FF2BBA13A40C24A17E83F202",
        "n_operation": 1133311
      },
      {
        "block": 107248,
        "account": 285630,
        "ophash":
            "F0A20100BE5B04008BF20E003E39FA92025317F408468564FC196B05A22747FD",
        "n_operation": 979595
      },
      {
        "block": 190669,
        "account": 285630,
        "ophash":
            "CDE80200BE5B0400283E3F007E14CFEF28671DF54FA056551F0C5A06BF988B0B",
        "n_operation": 4144680
      },
      {
        "block": 266179,
        "account": 1330335,
        "ophash":
            "C30F04009F4C140001000000C10EE494FD3511D44B83AA8F168258BEC764B59F",
        "n_operation": 1
      },
      {
        "block": 90072,
        "account": 285630,
        "ophash":
            "D85F0100BE5B0400E5B408006ABA4D7C2FC98BAFF046CE2AEC5FB78928B86572",
        "n_operation": 570597
      },
      {
        "block": 166793,
        "account": 467315,
        "ophash":
            "898B0200732107000800000041FE1DB3707F5558747AF981BB41E9C33DCB6AB5",
        "n_operation": 8
      },
      {
        "block": 124009,
        "account": 588621,
        "ophash":
            "69E401004DFB080014000000729C263F977EB1EEB36831C553C016045F36C9B4",
        "n_operation": 20
      },
      {
        "block": 98758,
        "account": 285630,
        "ophash":
            "C6810100BE5B0400B97E0B00376795081AE35F90D9D88C7EF1D38716A279F021",
        "n_operation": 753337
      },
      {
        "block": 67682,
        "account": 290760,
        "ophash":
            "62080100C86F04006A6500002DE7F08349F9212FB2CB33FAC4EA23141C97C400",
        "n_operation": 25962
      },
      {
        "block": 78957,
        "account": 285630,
        "ophash":
            "6D340100BE5B04006E8F0500F927DB8EC5C9B609AFB7B6934004E74DB1320C6D",
        "n_operation": 364398
      },
      {
        "block": 293621,
        "account": 86646,
        "ophash":
            "F57A040076520100B618000000D8DE5EFD1480C0F0A2F12EC25D1E90A50D389F",
        "n_operation": 6326
      },
      {
        "block": 73906,
        "account": 285630,
        "ophash":
            "B2200100BE5B040085F30300D8BB8B69ADD9DA958AB031717867305CD1F3E55E",
        "n_operation": 258949
      },
      {
        "block": 172908,
        "account": 863995,
        "ophash":
            "6CA30200FB2E0D00010000003E9BADF45BE7EE1654EBCC579384A81B78EA9B48",
        "n_operation": 1
      },
      {
        "block": 256395,
        "account": 1281415,
        "ophash":
            "8BE90300878D13000100000060C41189C5D49F5A3F689B62F3C9FB9E8A0C4065",
        "n_operation": 1
      },
      {
        "block": 102363,
        "account": 290911,
        "ophash":
            "DB8F01005F70040042000000710BC898DA4BC985CD8812FE7C7EDEBFB4DDE0F3",
        "n_operation": 66
      },
      {
        "block": 272747,
        "account": 1363215,
        "ophash":
            "6B2904000FCD1400010000004A6634A0CF2B3FE948E2B8AA8C0F3EBC1FD53736",
        "n_operation": 1
      },
      {
        "block": 85499,
        "account": 285630,
        "ophash":
            "FB4D0100BE5B0400827C07000B91E9B9CCA038EA2FCFDB701123FE1786496F99",
        "n_operation": 490626
      },
      {
        "block": 121919,
        "account": 285630,
        "ophash":
            "3FDC0100BE5B04008E301800B2F25B4DA7C0BD8DD18A63EE7323803EA92E51C3",
        "n_operation": 1585294
      },
      {
        "block": 217324,
        "account": 47805,
        "ophash":
            "EC500300BDBA00004F00000000757707E7BCF1B7CA4817BC853D876427285542",
        "n_operation": 79
      },
      {
        "block": 33490,
        "account": 3535,
        "ophash":
            "D2820000CF0D000015000000BFC5C63500E5B6A36560059698668DC1582AC6A2",
        "n_operation": 21
      },
      {
        "block": 77657,
        "account": 285630,
        "ophash":
            "592F0100BE5B0400B32705000756833F13CE363BD68885EB2A8AB0CF3D787EE7",
        "n_operation": 337843
      },
      {
        "block": 207107,
        "account": 1034980,
        "ophash":
            "03290300E4CA0F0001000000EA259C8B21C4A0DB90D6A493C8921DAE15983769",
        "n_operation": 1
      },
      {
        "block": 107453,
        "account": 160888,
        "ophash":
            "BDA3010078740200020000002DC3FD0032F9417AA7DE9FCB8A99E9835F928E31",
        "n_operation": 2
      },
      {
        "block": 86886,
        "account": 285630,
        "ophash":
            "66530100BE5B040083DD0700BB613A4740FE40784703884E992064E461EE33C3",
        "n_operation": 515459
      },
      {
        "block": 105422,
        "account": 86646,
        "ophash":
            "CE9B010076520100AB030000C70F3E3DBD570B95517875FA38072D57C608E315",
        "n_operation": 939
      },
      {
        "block": 107625,
        "account": 285630,
        "ophash":
            "69A40100BE5B0400DA260F00D4D06609054BB713E3BE2BBFC6473D3A206E6290",
        "n_operation": 992986
      },
      {
        "block": 205804,
        "account": 1028500,
        "ophash":
            "EC23030094B10F00010000002AD031EB248B8729FDB261A48CD6A36F5ADB7B37",
        "n_operation": 1
      },
      {
        "block": 98988,
        "account": 303905,
        "ophash":
            "AC82010021A30400030000008A762486C0F0CEEE4584728C4913588526CAF474",
        "n_operation": 3
      },
      {
        "block": 264243,
        "account": 1309660,
        "ophash":
            "33080400DCFB13000300000026C6F94612F5474ECE9378181FB67811356E0072",
        "n_operation": 3
      },
      {
        "block": 70416,
        "account": 285630,
        "ophash":
            "10130100BE5B0400A9C70200DECB8DC0B5E98CBFA909F22428F36D8AD8EF1550",
        "n_operation": 182185
      },
      {
        "block": 263474,
        "account": 1316835,
        "ophash":
            "32050400E31714000100000057867A698F1A48257D089B421AD7B8239D88A68F",
        "n_operation": 1
      },
      {
        "block": 186093,
        "account": 929930,
        "ophash":
            "EDD602008A300E00010000008FE3299EA49B50B44B6D9631CF506F9E7949BFBF",
        "n_operation": 1
      },
      {
        "block": 69173,
        "account": 285630,
        "ophash":
            "350E0100BE5B0400595A0200E7A8136DFB111F7E3F509E2B34CC3A9019EAC0E5",
        "n_operation": 154201
      },
      {
        "block": 227105,
        "account": 571630,
        "ophash":
            "21770300EEB80800D32C000055A6920ECDE08A89F57EE7960E6B357C893BDFA9",
        "n_operation": 11475
      },
      {
        "block": 254466,
        "account": 271959,
        "ophash":
            "02E2030057260400070000007F48E12A9B29B3EC4528E44BF77F4305220137B5",
        "n_operation": 7
      },
      {
        "block": 236525,
        "account": 1182110,
        "ophash":
            "ED9B03009E091200010000007FD692919D8E5BD4402DFC1506C067BCC6F27205",
        "n_operation": 1
      },
      {
        "block": 249594,
        "account": 285630,
        "ophash":
            "FACE0300BE5B040017FC4A0073E043E9F4EF45B19811EF5C2AFC9538B9E2A7CE",
        "n_operation": 4914199
      },
      {
        "block": 73391,
        "account": 285630,
        "ophash":
            "AF1E0100BE5B040007D00300EA1463D03B610C2305AE41695540DFC01BEA41FA",
        "n_operation": 249863
      },
      {
        "block": 205092,
        "account": 571630,
        "ophash":
            "24210300EEB80800A0250000DD059305BD3B889D707DB3386C49F3DB52B6CFEA",
        "n_operation": 9632
      },
      {
        "block": 45523,
        "account": 219045,
        "ophash":
            "D3B10000A5570300010000001E3DAC4B2B6A4541CF0CA5164B108C1C0F28C138",
        "n_operation": 1
      },
      {
        "block": 235809,
        "account": 188923,
        "ophash":
            "21990300FBE10200270000009956D57FB4913A91F19ACBCAD691FAA39F1FFC0D",
        "n_operation": 39
      },
      {
        "block": 107805,
        "account": 285630,
        "ophash":
            "1DA50100BE5B0400D8400F0042D7FD93682C8887DEEE6B1C5E6773516A4D1A37",
        "n_operation": 999640
      },
      {
        "block": 252125,
        "account": 366422,
        "ophash":
            "DDD8030056970500050000009B6AC5B177078666A5A62EA2EC7A2DD6AFF1AA08",
        "n_operation": 5
      },
      {
        "block": 146557,
        "account": 732265,
        "ophash":
            "7D3C0200692C0B0001000000496A7756DEFFFFB215BD8C22408E7FE9A7189F8F",
        "n_operation": 1
      },
      {
        "block": 281016,
        "account": 582406,
        "ophash":
            "B849040006E30800410000008D4EB81EDC2941686011645E5BAB41CD966E6275",
        "n_operation": 65
      },
      {
        "block": 195577,
        "account": 571630,
        "ophash":
            "F9FB0200EEB80800EF1C0000937E764F9E87F80F0C41B43D9A39AFB796A68D52",
        "n_operation": 7407
      },
      {
        "block": 219512,
        "account": 1097020,
        "ophash":
            "785903003CBD10000100000009A79D8A753838A5AD35961B9DF5EFD9F61719BB",
        "n_operation": 1
      },
      {
        "block": 65062,
        "account": 285630,
        "ophash":
            "26FE0000BE5B0400715501006C7DC8280B5E709CA6B1764CB137A2577CE0E6D3",
        "n_operation": 87409
      },
      {
        "block": 71423,
        "account": 285630,
        "ophash":
            "FF160100BE5B0400B52C03004ED4A1D1EC85F30E72DF33D9D83E1897912D951F",
        "n_operation": 208053
      },
      {
        "block": 281441,
        "account": 1406655,
        "ophash":
            "614B0400BF761500010000002777A707030D12D7E97C6CFB80359F7A0506685B",
        "n_operation": 1
      },
      {
        "block": 296584,
        "account": 1481985,
        "ophash":
            "88860400019D160001000000A6549B2A9CEFD4858E4D9F33E62753FFF7B7A2BF",
        "n_operation": 1
      },
      {
        "block": 61643,
        "account": 307590,
        "ophash":
            "CBF0000086B10400010000003D62699D7E0A3F5C003B6B69AE9E34E4E9D6539D",
        "n_operation": 1
      },
      {
        "block": 94629,
        "account": 285630,
        "ophash":
            "A5710100BE5B040089200A0074213C34C0AEBC1176315EB6D411481852DEC1C1",
        "n_operation": 663689
      },
      {
        "block": 158988,
        "account": 86646,
        "ophash":
            "0C6D020076520100100A00004CF669F1BA5E2169CFF3515E161C58FB2013FCAB",
        "n_operation": 2576
      },
      {
        "block": 89305,
        "account": 285630,
        "ophash":
            "D95C0100BE5B0400B6800800949AF117E34C6B332B682BC95B5C2ED281D7715A",
        "n_operation": 557238
      },
      {
        "block": 139351,
        "account": 696240,
        "ophash":
            "57200200B09F0A00010000005F4134F3EBCAF3B73989653DC2B87161F21B97CA",
        "n_operation": 1
      },
      {
        "block": 58445,
        "account": 285630,
        "ophash":
            "4DE40000BE5B04006F3500007863CC72F0CEB1409CC80EC6887E92207C410947",
        "n_operation": 13679
      },
      {
        "block": 268103,
        "account": 629030,
        "ophash":
            "4717040026990900270000001698A996DF51A1BAC86306CAB793ECAE86A2EEE3",
        "n_operation": 39
      },
      {
        "block": 123039,
        "account": 614650,
        "ophash":
            "9FE00100FA6009000100000022A0CBD4A904C612A1221A39DF24C0B8CBBEF5DF",
        "n_operation": 1
      },
      {
        "block": 298048,
        "account": 1303940,
        "ophash":
            "408C040084E5130001000000D0ADE437213AB5AD924D8ED65DC2FF0DA272C987",
        "n_operation": 1
      },
      {
        "block": 72404,
        "account": 282867,
        "ophash":
            "D41A0100F3500400140000007CB177FFEE08ABA2EB620F06E11A9B6E6DB64E57",
        "n_operation": 20
      },
      {
        "block": 117008,
        "account": 584515,
        "ophash":
            "10C9010043EB08000100000076433D989745D724786333DABA6C5613BC0B9924",
        "n_operation": 1
      },
      {
        "block": 146029,
        "account": 332823,
        "ophash":
            "6D3A0200171405005800000084DF70E3BF3F382DF78C9AFFCE9331866CB7AE71",
        "n_operation": 88
      },
      {
        "block": 136638,
        "account": 682670,
        "ophash":
            "BE150200AE6A0A0001000000E827EBDC580F1B0F2BE8B69862985500CBFE0C8D",
        "n_operation": 1
      },
      {
        "block": 231694,
        "account": 545034,
        "ophash":
            "0E8903000A51080004000000A0ABE9E03FF31DAEA6479C6167B4E272F12C48E9",
        "n_operation": 4
      },
      {
        "block": 122001,
        "account": 609480,
        "ophash":
            "91DC0100C84C0900010000005B9A2E76CCE0ECD75EA1E433BEBCA0E2B6BC2A6F",
        "n_operation": 1
      },
      {
        "block": 55151,
        "account": 273775,
        "ophash":
            "6FD700006F2D040001000000069AF1B76BE2A6B788F55E41E271BB5B6C07E2FB",
        "n_operation": 1
      },
      {
        "block": 235071,
        "account": 1174825,
        "ophash":
            "3F96030029ED110001000000F462FFC1D6145E125FF6AAD8E0BB2C9E9EA7EA52",
        "n_operation": 1
      },
      {
        "block": 175346,
        "account": 876185,
        "ophash":
            "F2AC0200995E0D000100000050424E9060CC62C72D682FB3A13A979AE0AF3E2D",
        "n_operation": 1
      },
      {
        "block": 99320,
        "account": 285630,
        "ophash":
            "F8830100BE5B04007AB20B007CFF89EE5A55906F0F73CB51C765B31128756FB1",
        "n_operation": 766586
      },
      {
        "block": 245202,
        "account": 1225460,
        "ophash":
            "D2BD0300F4B21200010000005C186120E9F13B6E235881BA3C653777EA011148",
        "n_operation": 1
      },
      {
        "block": 123195,
        "account": 285630,
        "ophash":
            "3BE10100BE5B0400D315190061C7431FCF474EBF9BCF85F6E104A646E64C8049",
        "n_operation": 1643987
      },
      {
        "block": 300632,
        "account": 1076799,
        "ophash":
            "589604003F6E1000070000002E5ACABA459FE87E05BE2AD065D5DEF933A8054A",
        "n_operation": 7
      },
      {
        "block": 155338,
        "account": 200119,
        "ophash":
            "CA5E0200B70D03000400000093AE9001B3A9EE9A69175B1162B6A2D1C8C57CAF",
        "n_operation": 4
      },
      {
        "block": 104892,
        "account": 523900,
        "ophash":
            "BC9901007CFE07000100000049B72B9C12A0E701734CB99F20FF6F0F3FCEEEA9",
        "n_operation": 1
      },
      {
        "block": 74516,
        "account": 164122,
        "ophash":
            "142301001A810200A2010000433FED94C3970462D04C2B41B285864BB043416D",
        "n_operation": 418
      },
      {
        "block": 25396,
        "account": 124860,
        "ophash":
            "34630000BCE7010001000000646D9F2A7B20CF98367574DA74DF562EE0D64A42",
        "n_operation": 1
      },
      {
        "block": 58106,
        "account": 285630,
        "ophash":
            "FAE20000BE5B0400C224000093A366F9ED1F9ACBBE1C6575864438B5C8DB03A8",
        "n_operation": 9410
      },
      {
        "block": 154283,
        "account": 285630,
        "ophash":
            "AB5A0200BE5B0400D47B2B0045A9D7393FC87CE6063E1A2FF9F60D85FEE8EF0D",
        "n_operation": 2849748
      },
      {
        "block": 70283,
        "account": 285630,
        "ophash":
            "8B120100BE5B040030BD02004132B0B9E343E72557078413FBBC30BE96B62F12",
        "n_operation": 179504
      },
      {
        "block": 70719,
        "account": 285630,
        "ophash":
            "3F140100BE5B040091E40200327BC04AD58984CD9A8B33543DDA4049528C6291",
        "n_operation": 189585
      },
      {
        "block": 119675,
        "account": 597820,
        "ophash":
            "7BD301003C1F0900010000005C98278683759B303FE7D9B53C6A2053E362F195",
        "n_operation": 1
      },
      {
        "block": 188078,
        "account": 350506,
        "ophash":
            "AEDE02002A5905002C050000A66E993E1A37F8CFC71CC94192C203B5F49CF9AE",
        "n_operation": 1324
      },
      {
        "block": 172242,
        "account": 86646,
        "ophash":
            "D2A0020076520100FC0F000045DA6E5DC61D399723E80CD3E886853FC29CE757",
        "n_operation": 4092
      },
      {
        "block": 202277,
        "account": 1010840,
        "ophash":
            "25160300986C0F0001000000A34DDD49316C6627B40EDC29C123517225823CD5",
        "n_operation": 1
      },
      {
        "block": 60505,
        "account": 290760,
        "ophash":
            "59EC0000C86F0400EA24000010031678053F223002513D3E4CEC1F55FB5396B4",
        "n_operation": 9450
      },
      {
        "block": 271417,
        "account": 1356555,
        "ophash":
            "392404000BB31400010000007265AFE4A7B9D8B4B55D7124D182121BC9198484",
        "n_operation": 1
      },
      {
        "block": 175549,
        "account": 877230,
        "ophash":
            "BDAD0200AE620D000100000083B5FDAEF2B6DEEE777D9094DE2E54D5CCEC1680",
        "n_operation": 1
      },
      {
        "block": 157678,
        "account": 787860,
        "ophash":
            "EE67020094050C000100000044CA9B2B15F45C00B527772629219D0C4DE1C7BB",
        "n_operation": 1
      },
      {
        "block": 266384,
        "account": 285630,
        "ophash":
            "90100400BE5B04004F064D00F053B2AD8E2166012285A0901D740CAB79D1F1CD",
        "n_operation": 5047887
      },
      {
        "block": 137856,
        "account": 285630,
        "ophash":
            "801A0200BE5B0400A888220037019E7BBF3640008CFF8D1DCF69EF1006431518",
        "n_operation": 2263208
      },
      {
        "block": 136625,
        "account": 682585,
        "ophash":
            "B1150200596A0A00010000004FE2E4F6FDBDE61352F49D9F991B27168AB69AF1",
        "n_operation": 1
      },
      {
        "block": 63969,
        "account": 290760,
        "ophash":
            "E1F90000C86F0400B1470000A80BDD2CEB1DC7917F13F369409035C8CF950CAC",
        "n_operation": 18353
      },
      {
        "block": 94915,
        "account": 285630,
        "ophash":
            "C3720100BE5B040025380A006BAEAC35E0305700DC880800A293DCEAF636AB50",
        "n_operation": 669733
      },
      {
        "block": 297004,
        "account": 1484475,
        "ophash":
            "2C880400BBA6160001000000B79A7B94D82226A117399FBA07DE45460F715218",
        "n_operation": 1
      },
      {
        "block": 254564,
        "account": 285630,
        "ophash":
            "64E20300BE5B0400C35F4B004E3EE134C8E8E7105280F1CFAC52F8EEF7D4FFAA",
        "n_operation": 4939715
      },
      {
        "block": 169764,
        "account": 848290,
        "ophash":
            "24970200A2F10C000100000035C25B89A11229D0BF411077FB5C91450B37382D",
        "n_operation": 1
      },
      {
        "block": 15146,
        "account": 73005,
        "ophash":
            "2A3B00002D1D01000100000059E952FEEA140BE34CB2C54BBFD1FAC86B0A2ACB",
        "n_operation": 1
      },
      {
        "block": 168794,
        "account": 3570,
        "ophash":
            "5A930200F20D0000250000006EEE8A381E26E25FD12679E950562873435E7342",
        "n_operation": 37
      },
      {
        "block": 120517,
        "account": 285630,
        "ophash":
            "C5D60100BE5B0400B9391700A18EEC9F013BA64039F1B80BB4510C4540566A2A",
        "n_operation": 1522105
      },
      {
        "block": 78077,
        "account": 285630,
        "ophash":
            "FD300100BE5B0400A14705002054A43E07063D80CBC2E4DF833E9EE49569AC73",
        "n_operation": 346017
      },
      {
        "block": 162396,
        "account": 811445,
        "ophash":
            "5C7A0200B5610C0001000000AFEEB09F9DE079D36857D5308101D4F9FA47B945",
        "n_operation": 1
      },
      {
        "block": 61336,
        "account": 290760,
        "ophash":
            "98EF0000C86F0400502C0000B93D6567A83E4307E6E21D9CA591DC4EF584E1B1",
        "n_operation": 11344
      },
      {
        "block": 130474,
        "account": 86646,
        "ophash":
            "AAFD01007652010042070000F452FF6CFE01B927E69371E058086A1C9A56B4D8",
        "n_operation": 1858
      },
      {
        "block": 199067,
        "account": 571630,
        "ophash":
            "9B090300EEB8080029200000E5D954B7E82F86305EE4887DD68002CCB4E8C178",
        "n_operation": 8233
      },
      {
        "block": 120758,
        "account": 86646,
        "ophash":
            "B6D7010076520100000600006B0B8128FA653C416F3076F797D2993D980072A8",
        "n_operation": 1536
      },
      {
        "block": 275591,
        "account": 285630,
        "ophash":
            "87340400BE5B040054E74D00E4B2092A355C42E246FEECB1E6D495CAC622B585",
        "n_operation": 5105492
      },
      {
        "block": 259212,
        "account": 195655,
        "ophash":
            "8CF4030047FC02000E000000D07CCDD94A4A923BC15917E589AEA9C6E5232774",
        "n_operation": 14
      },
      {
        "block": 74904,
        "account": 373990,
        "ophash":
            "98240100E6B405000100000033A570577C2CEBB59D2075689300898F43BB696E",
        "n_operation": 1
      },
      {
        "block": 140237,
        "account": 700665,
        "ophash":
            "CD230200F9B00A00010000003BD5AD92297250B90BA756B2BCDA560D0FD4EBC5",
        "n_operation": 1
      },
      {
        "block": 207176,
        "account": 1035320,
        "ophash":
            "4829030038CC0F0001000000E1932E805C6B64254AA3535E70B13ECD0C4F00FE",
        "n_operation": 1
      },
      {
        "block": 273457,
        "account": 1366775,
        "ophash":
            "312C0400F7DA140001000000381F85DA1DACF5B0ADBF9F13D752E3E5CA4155E3",
        "n_operation": 1
      },
      {
        "block": 97198,
        "account": 285630,
        "ophash":
            "AE7B0100BE5B0400A2EF0A00EFE09313A00271C8118D2B06251F61E2536EC4A4",
        "n_operation": 716706
      },
      {
        "block": 59580,
        "account": 285630,
        "ophash":
            "BCE80000BE5B0400DC63000065DCF77335341CA7126D035BC7ED004442CA9DD7",
        "n_operation": 25564
      },
      {
        "block": 147206,
        "account": 735490,
        "ophash":
            "063F020002390B00010000007FBAC29CE4D4B10BC2FBF5AC395E75874591D3C8",
        "n_operation": 1
      },
      {
        "block": 286648,
        "account": 1432690,
        "ophash":
            "B85F040072DC1500010000000FB8A3C06C20E65BCD3675D2700D6BD90155A247",
        "n_operation": 1
      },
      {
        "block": 139704,
        "account": 697990,
        "ophash":
            "B821020086A60A0001000000AC49048F769AE409ACD214AEBFF343D894E82CD0",
        "n_operation": 1
      },
      {
        "block": 218525,
        "account": 1092095,
        "ophash":
            "9D550300FFA9100001000000DF80BBA3139B4AD92C3AF3C0AD0FD6AEC709F01B",
        "n_operation": 1
      },
      {
        "block": 113998,
        "account": 285630,
        "ophash":
            "4EBD0100BE5B0400C5B312004ECCFF6DD628A97472A8F1A11E0C4C738B40FE92",
        "n_operation": 1225669
      },
      {
        "block": 1191,
        "account": 5010,
        "ophash":
            "A704000092130000010000006CEA38D565B3358778030C70681DEB048C71919F",
        "n_operation": 1
      },
      {
        "block": 103962,
        "account": 285630,
        "ophash":
            "1A960100BE5B0400EB3D0D00AD27A9E67FE484684A46E25FEFD29B310A59D774",
        "n_operation": 867819
      },
      {
        "block": 63446,
        "account": 285630,
        "ophash":
            "D6F70000BE5B040006200100EE90B8E3FB8EDE97DA184E65A8AECA82E97EC6F3",
        "n_operation": 73734
      },
      {
        "block": 201951,
        "account": 1009240,
        "ophash":
            "DF14030058660F00010000009328E8BB9F67BE62927F620B099CE784FE33B867",
        "n_operation": 1
      },
      {
        "block": 58160,
        "account": 285630,
        "ophash":
            "30E30000BE5B0400842600006DEDD1C1F8E691325EE96965F1D6061389E20579",
        "n_operation": 9860
      },
      {
        "block": 178776,
        "account": 893350,
        "ophash":
            "58BA0200A6A10D0001000000AA0C1D2672854CA1841A3EFE767405E62A487EFF",
        "n_operation": 1
      },
      {
        "block": 119769,
        "account": 285630,
        "ophash":
            "D9D30100BE5B04004DB016009A55D50EC4817DFADC9E8FB5B2A5A02D189CE43C",
        "n_operation": 1486925
      },
      {
        "block": 281710,
        "account": 1408005,
        "ophash":
            "6E4C0400057C150001000000B1DF169226CFA370B6D462DF13B27789BA8016ED",
        "n_operation": 1
      },
      {
        "block": 294215,
        "account": 69933,
        "ophash":
            "477D04002D1101001900000087209747EA0CCC394A5BB8E2329B9AAFB2BBCC36",
        "n_operation": 25
      },
      {
        "block": 176781,
        "account": 285630,
        "ophash":
            "8DB20200BE5B04007E0538006782521BB2A89ACEBE9F95F7F66C9E87744F989C",
        "n_operation": 3671422
      },
      {
        "block": 207562,
        "account": 571630,
        "ophash":
            "CA2A0300EEB80800E127000099D6DDD839ED7CE16878CDD120E71727168562DE",
        "n_operation": 10209
      },
      {
        "block": 287533,
        "account": 1437125,
        "ophash":
            "2D630400C5ED1500010000002E164FB8108E75C92668D1B724C2E7B4F4307EB8",
        "n_operation": 1
      },
      {
        "block": 99850,
        "account": 285630,
        "ophash":
            "0A860100BE5B040034C70B00B8E21D3FB67A624C1B661C8E053BB29B98290BD4",
        "n_operation": 771892
      },
      {
        "block": 251056,
        "account": 1254715,
        "ophash":
            "B0D403003B251300010000001DE45A8961ACF8BF0F7F62AA2B63D7BECFE8EAB6",
        "n_operation": 1
      },
      {
        "block": 253729,
        "account": 1268115,
        "ophash":
            "21DF0300935913000100000082C80D912A3429A0F62C625970F456554755D251",
        "n_operation": 1
      },
      {
        "block": 255192,
        "account": 1275345,
        "ophash":
            "D8E40300D175130001000000DF6773F6C738913FE85C2D9B8BA951D12272BC66",
        "n_operation": 1
      },
      {
        "block": 146609,
        "account": 285630,
        "ophash":
            "B13C0200BE5B04005CC527002478B7787E181522BBD61120BB906315A24A35F1",
        "n_operation": 2606428
      },
      {
        "block": 115476,
        "account": 576870,
        "ophash":
            "14C3010066CD080001000000CA463364DC83AC555FD38175E0F7F087E3FBB54B",
        "n_operation": 1
      },
      {
        "block": 227695,
        "account": 6680,
        "ophash":
            "6F790300181A000007000000D70169AE3DE6F5320DC097A3FE3F317241A796E0",
        "n_operation": 7
      },
      {
        "block": 263468,
        "account": 1316815,
        "ophash":
            "2C050400CF171400010000006C40F28E9E7F10D427D292348BF991441C3F5884",
        "n_operation": 1
      },
      {
        "block": 139146,
        "account": 274800,
        "ophash":
            "8A1F02007031040004000000583CAE29D930DCF4B4C244C5D8520AFFE38B0F20",
        "n_operation": 4
      },
      {
        "block": 90345,
        "account": 285630,
        "ophash":
            "E9600100BE5B040068C70800F2FC3549DD406F68A4638506567EAD0E57D53B7F",
        "n_operation": 575336
      },
      {
        "block": 81492,
        "account": 86646,
        "ophash":
            "543E010076520100C40100009487EB357CA0A1B362044BCF06CA8771918C5353",
        "n_operation": 452
      },
      {
        "block": 148934,
        "account": 744145,
        "ophash":
            "C6450200D15A0B00010000004B449A2E684C59E32AE0AD964893CE6B03971AB0",
        "n_operation": 1
      },
      {
        "block": 92617,
        "account": 278248,
        "ophash":
            "C9690100E83E0400030000004E2CD07FD528002361416FC0204847F2BD11A43E",
        "n_operation": 3
      },
      {
        "block": 149157,
        "account": 745265,
        "ophash":
            "A5460200315F0B000100000089975F7CA115B64E3207EB5E2DDA2E3AFF8B912D",
        "n_operation": 1
      },
      {
        "block": 73635,
        "account": 285630,
        "ophash":
            "A31F0100BE5B04007FE003004FC3E8B7D187823CAF31798FF973049D0F292025",
        "n_operation": 254079
      },
      {
        "block": 91331,
        "account": 285630,
        "ophash":
            "C3640100BE5B0400CF100900E0EA7BA14D603CA7362D96EE47A77AC7835C9B6A",
        "n_operation": 594127
      },
      {
        "block": 169807,
        "account": 86646,
        "ophash":
            "4F97020076520100270F000092BDDDF1A7423C353ACAB8D214D2F4B0BD1021E5",
        "n_operation": 3879
      },
      {
        "block": 141158,
        "account": 705225,
        "ophash":
            "66270200C9C20A0001000000196E985F399A0C90C4BB1B6B804018E45A3254E1",
        "n_operation": 1
      },
      {
        "block": 176604,
        "account": 285630,
        "ophash":
            "DCB10200BE5B04002BD53700C5B84D9CFBD5A03E4F425B942CB9E31EE6660025",
        "n_operation": 3659051
      },
      {
        "block": 88225,
        "account": 285630,
        "ophash":
            "A1580100BE5B04007A340800679A85D79A09010D2FB52FD1A3C1EAD943F10436",
        "n_operation": 537722
      },
      {
        "block": 138048,
        "account": 285630,
        "ophash":
            "401B0200BE5B04008EA822003D23A06CA163AD81F63AD1935418EC353D34BA25",
        "n_operation": 2271374
      },
      {
        "block": 212292,
        "account": 1060940,
        "ophash":
            "443D03004C30100001000000D51E7CF014AB1FDC7339023ED0C50AC1CC934824",
        "n_operation": 1
      },
      {
        "block": 170850,
        "account": 285630,
        "ophash":
            "629B0200BE5B04005C6C3400D0A7B6E25BF80CB75DC8602917E2BA1FCEDF5E04",
        "n_operation": 3435612
      },
      {
        "block": 91004,
        "account": 285630,
        "ophash":
            "7C630100BE5B040077F708001968E50B4BF65462B028EAC6672B564179B7FCD1",
        "n_operation": 587639
      },
      {
        "block": 73560,
        "account": 285630,
        "ophash":
            "581F0100BE5B040085DB03002D5DDF43C8F11C5AB7873BD9BD2AFD5D3671BED4",
        "n_operation": 252805
      },
      {
        "block": 245101,
        "account": 285630,
        "ophash":
            "6DBD0300BE5B0400E49C4A006584FAFA2C3C8E96136D7A6FD2A74AFED691DF81",
        "n_operation": 4889828
      },
      {
        "block": 125544,
        "account": 627190,
        "ophash":
            "68EA0100F691090001000000DAB106BFE581029866BCEF8D15DF667E9E5CB518",
        "n_operation": 1
      },
      {
        "block": 231729,
        "account": 1158085,
        "ophash":
            "31890300C5AB110001000000C6FD506440F78D8ABF5B606337625E49BBFBBDD8",
        "n_operation": 1
      },
      {
        "block": 64598,
        "account": 285630,
        "ophash":
            "56FC0000BE5B040092460100B3F67789B4E355297883AA293AB32838E41ABC99",
        "n_operation": 83602
      },
      {
        "block": 73283,
        "account": 285630,
        "ophash":
            "431E0100BE5B0400E6C9030084A20B98628DA32B5258DE0FAC2EC6A003C85F12",
        "n_operation": 248294
      },
      {
        "block": 210360,
        "account": 529497,
        "ophash":
            "B83503005914080003000000A9F6C9660AD322B96ADFC7A1E1B146297A13FFB5",
        "n_operation": 3
      },
      {
        "block": 113922,
        "account": 285630,
        "ophash":
            "02BD0100BE5B04001DAB12002B71936474F2846292DD675D6394BCCB6756AE67",
        "n_operation": 1223453
      },
      {
        "block": 117718,
        "account": 588070,
        "ophash":
            "D6CB010026F9080001000000D47891024BBBCB0DDACA8C03A2D57D3FDD43DC14",
        "n_operation": 1
      },
      {
        "block": 117033,
        "account": 584650,
        "ophash":
            "29C90100CAEB0800010000003E2942293C6939A950605FF7B1D0F680C530783B",
        "n_operation": 1
      },
      {
        "block": 185454,
        "account": 571630,
        "ophash":
            "6ED40200EEB808002615000031BCDDA3EABF618DED799F51CD7B9E276BEDED16",
        "n_operation": 5414
      },
      {
        "block": 126673,
        "account": 632850,
        "ophash":
            "D1EE010012A8090001000000D2EF3494DD7C13BF1BC5EC68C70C7518FC28F41D",
        "n_operation": 1
      },
      {
        "block": 128464,
        "account": 641805,
        "ophash":
            "D0F501000DCB0900010000005093F96D88F44B3B997E03E3F7EA167DF055C9AF",
        "n_operation": 1
      },
      {
        "block": 202622,
        "account": 1012595,
        "ophash":
            "7E17030073730F00010000008FD932449C23B4BAFABC47A709EC538E75FC549F",
        "n_operation": 1
      },
      {
        "block": 218755,
        "account": 1093240,
        "ophash":
            "8356030078AE100001000000CD5D00FC1B58A5E99F10BF5FE1BB8D1DCA2EEBBF",
        "n_operation": 1
      },
      {
        "block": 286089,
        "account": 547523,
        "ophash":
            "895D0400C35A080080000000E1921F23F3B2886A4097ED87C4E19EA13725022C",
        "n_operation": 128
      },
      {
        "block": 61645,
        "account": 285630,
        "ophash":
            "CDF00000BE5B0400B8C5000070FD85D5D8801B36357340B61234A5EE7E354A67",
        "n_operation": 50616
      },
      {
        "block": 261090,
        "account": 285630,
        "ophash":
            "E2FB0300BE5B04003BDE4B005488AA0D489AC55803A46F179DE2939D90A50F61",
        "n_operation": 4972091
      },
      {
        "block": 65096,
        "account": 285630,
        "ophash":
            "48FE0000BE5B0400DE550100F05997513419B7F30B4DE15A2C48ED84CA68909F",
        "n_operation": 87518
      },
      {
        "block": 194168,
        "account": 571630,
        "ophash":
            "78F60200EEB80800A61B0000F05CC08AFDEE9072A80A787146B0FC89C9BACFF2",
        "n_operation": 7078
      },
      {
        "block": 238927,
        "account": 1194105,
        "ophash":
            "4FA503007938120001000000CD34CAB2495B3ADF8ED72CC890E22B6CAF02C54F",
        "n_operation": 1
      },
      {
        "block": 168334,
        "account": 838183,
        "ophash":
            "8E91020027CA0C0006000000731EFF4111C74AE953505EB78218D5F36E3DE183",
        "n_operation": 6
      },
      {
        "block": 164713,
        "account": 86646,
        "ophash":
            "69830200765201000A0C0000731F67F94B85FD0CFE11F8F75361DECCCCDC0203",
        "n_operation": 3082
      },
      {
        "block": 145011,
        "account": 724515,
        "ophash":
            "73360200230E0B0001000000B121C049559E46DDE6E77F7DB8A9E5C6F3CBAE4D",
        "n_operation": 1
      },
      {
        "block": 54282,
        "account": 122478,
        "ophash":
            "0AD400006EDE0100170000003CD0C51F6336AF96A96D55279B928A7211CB18C4",
        "n_operation": 23
      },
      {
        "block": 259445,
        "account": 587022,
        "ophash":
            "75F503000EF50800020000003E35BFE9FB939B34596E6FB7621BC4B650522CAE",
        "n_operation": 2
      },
      {
        "block": 71330,
        "account": 168536,
        "ophash":
            "A2160100589202006C000000A2C8F5AB3B3C87C2B1A31B4651CEA146429EF186",
        "n_operation": 108
      },
      {
        "block": 72087,
        "account": 285630,
        "ophash":
            "97190100BE5B0400EE6A03007D51003B708BFB49A16168207946C8B91235262F",
        "n_operation": 223982
      },
      {
        "block": 82120,
        "account": 285630,
        "ophash":
            "C8400100BE5B0400AD8B0600D2259628B00E8A5240FA1026D4D82EBB2FCB2571",
        "n_operation": 428973
      },
      {
        "block": 101044,
        "account": 285630,
        "ophash":
            "B48A0100BE5B0400A3370C00BEE19753BBB660146868C21A05E0DD32A36888D5",
        "n_operation": 800675
      },
      {
        "block": 154118,
        "account": 770070,
        "ophash":
            "065A020016C00B0001000000AD31D8491C367E7D95ECCA5FC662CDBE49F0C23F",
        "n_operation": 1
      },
      {
        "block": 75494,
        "account": 376945,
        "ophash":
            "E626010071C0050001000000E02D765830EA9C2C13EFCF0CE24E48B8BD40A068",
        "n_operation": 1
      },
      {
        "block": 98228,
        "account": 285630,
        "ophash":
            "B47F0100BE5B0400864C0B00F797E42F8B1F8A8BF68EF6FBEE9018C523308F59",
        "n_operation": 740486
      },
      {
        "block": 128845,
        "account": 285630,
        "ophash":
            "4DF70100BE5B040013EB1C00DAAFF4035605EDF948351D09B2F312AE99D5F58C",
        "n_operation": 1895187
      },
      {
        "block": 165604,
        "account": 571630,
        "ophash":
            "E4860200EEB80800B00A00007A881B54E77DA30F4F14263103BB9983886EFBBE",
        "n_operation": 2736
      },
      {
        "block": 76952,
        "account": 285630,
        "ophash":
            "982C0100BE5B0400B9F5040067BD5658D4C2577165F4C52428B134A3E25754E0",
        "n_operation": 325049
      },
      {
        "block": 143439,
        "account": 716645,
        "ophash":
            "4F30020065EF0A0001000000AA4F4DFB5D4D5E69D97C309B5813858909EBF71F",
        "n_operation": 1
      },
      {
        "block": 259851,
        "account": 587043,
        "ophash":
            "0BF7030023F50800020000001D364AAC5B7E4DCDBE171D8D7FF9764A7DA55EDA",
        "n_operation": 2
      },
      {
        "block": 157514,
        "account": 285630,
        "ophash":
            "4A670200BE5B0400F8FC2C005ED1880D5B95E8F49FE6951B0A7C70004E9770B2",
        "n_operation": 2948344
      },
      {
        "block": 57227,
        "account": 285610,
        "ophash":
            "8BDF0000AA5B0400010000008BE28F287E74F7100FBEDBD415DEE7DD85F5336E",
        "n_operation": 1
      },
      {
        "block": 83245,
        "account": 415665,
        "ophash":
            "2D450100B15706000100000075206FE36A9B40C3963C1C983E26327647BDE20A",
        "n_operation": 1
      },
      {
        "block": 244096,
        "account": 1219960,
        "ophash":
            "80B90300789D120001000000FDB40E0B61645EB86A06E4B62BF7C619D55DE58E",
        "n_operation": 1
      },
      {
        "block": 175063,
        "account": 571630,
        "ophash":
            "D7AB0200EEB80800450F0000F224EDE0BB20831692A941FAD5CC0FBDB5B352E0",
        "n_operation": 3909
      },
      {
        "block": 149073,
        "account": 285630,
        "ophash":
            "51460200BE5B04004F002900A4A808801A76C70374C082325C835C9B818B4F51",
        "n_operation": 2687055
      },
      {
        "block": 238652,
        "account": 1192690,
        "ophash":
            "3CA40300F23212000100000048CB9170AD33F27F3389154FAD6D345FB7C1639B",
        "n_operation": 1
      },
      {
        "block": 256462,
        "account": 439015,
        "ophash":
            "CEE90300E7B20600050000004D8E4AF9F6B0ED3F66F4F5D304626FC6E5F8A25D",
        "n_operation": 5
      },
      {
        "block": 59878,
        "account": 285630,
        "ophash":
            "E6E90000BE5B04002971000066D21AF40410F66FF15E92DF92662FA907D33447",
        "n_operation": 28969
      },
      {
        "block": 88514,
        "account": 285630,
        "ophash":
            "C2590100BE5B04005F4808004E860BE21E9C9D7A55415F6B57A6A376EA01ADD6",
        "n_operation": 542815
      },
      {
        "block": 225698,
        "account": 1127955,
        "ophash":
            "A27103001336110001000000EEDDD98D2867C675C7116EFC3F3946AEAFBA8651",
        "n_operation": 1
      },
      {
        "block": 149572,
        "account": 747335,
        "ophash":
            "4448020047670B00010000005A3C43E1AFBE16668507937B603E2B4A93615069",
        "n_operation": 1
      },
      {
        "block": 107022,
        "account": 285630,
        "ophash":
            "0EA20100BE5B04008DD30E002EAD6E0F1E8E2A29040C5B6D4A822DDE3B044CC0",
        "n_operation": 971661
      },
      {
        "block": 125576,
        "account": 285630,
        "ophash":
            "88EA0100BE5B040089B41A00B916604BAC23D8398220A9CFE3D1C148CCFC480E",
        "n_operation": 1750153
      },
      {
        "block": 57287,
        "account": 285350,
        "ophash":
            "C7DF0000A65A0400020000000871D5830BC3676B190FCBFDF1D08E3B3697B7A0",
        "n_operation": 2
      },
      {
        "block": 78407,
        "account": 340845,
        "ophash":
            "473201006D33050061020000E9AD4996D9DE35F3941E660A118B8F02C7689463",
        "n_operation": 609
      },
      {
        "block": 91886,
        "account": 52558,
        "ophash":
            "EE6601004ECD000001000000D124806E30AB904624E18A508438A77439FF9122",
        "n_operation": 1
      },
      {
        "block": 111032,
        "account": 86646,
        "ophash":
            "B8B1010076520100A40400006DC0EF600ECD124CFA920EA76D10B09D9E200F64",
        "n_operation": 1188
      },
      {
        "block": 220118,
        "account": 1100065,
        "ophash":
            "D65B030021C91000010000000331E441FFF44349181982F380979417D6566778",
        "n_operation": 1
      },
      {
        "block": 241257,
        "account": 1205755,
        "ophash":
            "69AE0300FB65120001000000FDC4B087DDA138A7619B738BEFA6EB6E5BB33103",
        "n_operation": 1
      },
      {
        "block": 243548,
        "account": 1217195,
        "ophash":
            "5CB70300AB92120001000000D52E6FA2AD1B859AAED97C289E49801FB2029C17",
        "n_operation": 1
      },
      {
        "block": 132079,
        "account": 285630,
        "ophash":
            "EF030200BE5B0400FEE31E00EA7E8535A3927BD9455C8790E09E5C5BFFBC3D5B",
        "n_operation": 2024446
      },
      {
        "block": 68606,
        "account": 285630,
        "ophash":
            "FE0B0100BE5B0400A925020080F8CDD18CA989A37EDF91177CC048CD76BFE82F",
        "n_operation": 140713
      },
      {
        "block": 245375,
        "account": 1226315,
        "ophash":
            "7FBE03004BB61200010000000952EE10D3E0CE4D4C5B96B13CAF23FC95A5E2BC",
        "n_operation": 1
      },
      {
        "block": 261265,
        "account": 274532,
        "ophash":
            "91FC03006430040007000000D6A767CD048FE485525FD47162359FC1893BC63F",
        "n_operation": 7
      },
      {
        "block": 281063,
        "account": 34500,
        "ophash":
            "E7490400C4860000F81F0000C78E37C4C78B81F377046B90EFD6D410843B05D9",
        "n_operation": 8184
      },
      {
        "block": 107774,
        "account": 285630,
        "ophash":
            "FEA40100BE5B04006C3D0F0004191D8026D0E20662A466F54B4F672593F60C5D",
        "n_operation": 998764
      },
      {
        "block": 195452,
        "account": 976725,
        "ophash":
            "7CFB020055E70E0001000000CEC4C88BAD7837CABA50E7C9C51399B6D6599E97",
        "n_operation": 1
      },
      {
        "block": 270803,
        "account": 1353485,
        "ophash":
            "D32104000DA714000100000048BAEC9151E6158BDBF17566AE9562B4865BECF6",
        "n_operation": 1
      },
      {
        "block": 101306,
        "account": 285630,
        "ophash":
            "BA8B0100BE5B040097500C006AEA6C6F7A612DEF397477A52D5A93A76CE7679A",
        "n_operation": 807063
      },
      {
        "block": 62231,
        "account": 290760,
        "ophash":
            "17F30000C86F04002A370000A1D12B45A54977FA0BEA2B5E78E36E8DA3683A7B",
        "n_operation": 14122
      },
      {
        "block": 132316,
        "account": 285630,
        "ophash":
            "DC040200BE5B0400750B1F003DE6F1121E75ACB66030B6772CD3F168FBCE794B",
        "n_operation": 2034549
      },
      {
        "block": 188141,
        "account": 350506,
        "ophash":
            "EDDE02002A59050031050000879155E92867EE82E55AE0FD6F2817D97A3DFA60",
        "n_operation": 1329
      },
      {
        "block": 126371,
        "account": 631325,
        "ophash":
            "A3ED01001DA2090001000000414882C816683728D969F1646619BE9ECF6814F8",
        "n_operation": 1
      },
      {
        "block": 75435,
        "account": 285630,
        "ophash":
            "AB260100BE5B0400DF76040096B016D797DBDDDCBBF28C8C86C6DCD821AFD495",
        "n_operation": 292575
      },
      {
        "block": 94595,
        "account": 285630,
        "ophash":
            "83710100BE5B0400A81C0A00FA5E88A0FEDA6C4F7012DB515F1C73EC8DF441E0",
        "n_operation": 662696
      },
      {
        "block": 24553,
        "account": 121790,
        "ophash":
            "E95F0000BEDB0100010000009E0BE8CC2ED939A88A8BCFAE1C6912E29DE746E0",
        "n_operation": 1
      },
      {
        "block": 209490,
        "account": 571630,
        "ophash":
            "52320300EEB8080046290000302347C6494A3A45082969588B5311BF4CADCBD4",
        "n_operation": 10566
      },
      {
        "block": 110262,
        "account": 285630,
        "ophash":
            "B6AE0100BE5B04005A931000A33141E99FAD8EDBC589688C9C54F9433DF260CB",
        "n_operation": 1086298
      },
      {
        "block": 211707,
        "account": 1057995,
        "ophash":
            "FB3A0300CB24100001000000811E3A853A3D65171166E11D7EB3C74D07AE4A0C",
        "n_operation": 1
      },
      {
        "block": 105352,
        "account": 285630,
        "ophash":
            "889B0100BE5B040067FA0D0065E746D346A352CFE546E0DBDF2B29B78AF8EEBC",
        "n_operation": 916071
      },
      {
        "block": 110239,
        "account": 285630,
        "ophash":
            "9FAE0100BE5B0400658F10005F2B4E6073F8F8B8031DECD5CA9034E974AB113B",
        "n_operation": 1085285
      },
      {
        "block": 66814,
        "account": 290760,
        "ophash":
            "FE040100C86F0400905E00004C254E10AD3FFEC24D98665CD01DCB2F4194716D",
        "n_operation": 24208
      },
      {
        "block": 125099,
        "account": 619703,
        "ophash":
            "ABE80100B77409000B000000D019D80BD44D5245D16CEC5BDDEF5C044A16176E",
        "n_operation": 11
      },
      {
        "block": 60195,
        "account": 285630,
        "ophash":
            "23EB0000BE5B0400258000005302755C5C44C4D62A236AAC47568A55DFACB383",
        "n_operation": 32805
      },
      {
        "block": 62919,
        "account": 285630,
        "ophash":
            "C7F50000BE5B0400C00201007C5401FA64D6D1481A132C8A15B6F51BB23AEA64",
        "n_operation": 66240
      },
      {
        "block": 120796,
        "account": 86646,
        "ophash":
            "DCD70100765201000506000049B586745219336B34E2B3789AAD5F20DD8912E4",
        "n_operation": 1541
      },
      {
        "block": 249491,
        "account": 1246925,
        "ophash":
            "93CE0300CD06130001000000B8E624341F90B048B339CFAF5DF072D820283767",
        "n_operation": 1
      },
      {
        "block": 159888,
        "account": 798905,
        "ophash":
            "90700200B9300C0001000000902875E956F5F0F08586344042BD18D921478BCF",
        "n_operation": 1
      },
      {
        "block": 120372,
        "account": 571630,
        "ophash":
            "34D60100EEB80800C9000000516389EFCB95697E58914E734CC5B4DA9AF6EB42",
        "n_operation": 201
      },
      {
        "block": 134020,
        "account": 669575,
        "ophash":
            "840B020087370A00010000003CEED020A8715A3E2298F501BB403232BD4B8DC1",
        "n_operation": 1
      },
      {
        "block": 128483,
        "account": 285630,
        "ophash":
            "E3F50100BE5B0400C3AD1C00AFB2AB4FB9E75A7FB76FEE05776CC7E23A862168",
        "n_operation": 1879491
      },
      {
        "block": 55228,
        "account": 274075,
        "ophash":
            "BCD700009B2E04000100000075C854FC4C1B55CB59920BE511297065795428E8",
        "n_operation": 1
      },
      {
        "block": 68681,
        "account": 285630,
        "ophash":
            "490C0100BE5B0400322E02005D01D1D0477EBB3DF8B01807CEE82BA22D93A7D8",
        "n_operation": 142898
      },
      {
        "block": 208524,
        "account": 1042060,
        "ophash":
            "8C2E03008CE60F0001000000F3DC304CE960FB3BB106D4DCB1843D90554B1970",
        "n_operation": 1
      },
      {
        "block": 214374,
        "account": 571630,
        "ophash":
            "66450300EEB80800782A00001BA1A05A134776FBBCD673702F816B1C55472C9E",
        "n_operation": 10872
      },
      {
        "block": 240583,
        "account": 1202385,
        "ophash":
            "C7AB0300D15812000100000001E3EB52CDDCFDAA5A1D9A9DA5074C96E02E7DAB",
        "n_operation": 1
      },
      {
        "block": 272262,
        "account": 499123,
        "ophash":
            "86270400B39D070002000000E3C1069E796EE5F10743BC1E898FCAA3F0CE6762",
        "n_operation": 2
      },
      {
        "block": 189188,
        "account": 110027,
        "ophash":
            "04E30200CBAD01007002000093597F8C4CE789F00BB0DDD690B2D65C2C4AD048",
        "n_operation": 624
      },
      {
        "block": 55907,
        "account": 279005,
        "ophash":
            "63DA0000DD41040001000000D7D3D5CE0C4828155C09BA1988EC36F9462DEB82",
        "n_operation": 1
      },
      {
        "block": 225327,
        "account": 1126060,
        "ophash":
            "2F700300AC2E110001000000B6249D63D51C4ADBF98D23C8AF8DCCB5A5E46532",
        "n_operation": 1
      },
      {
        "block": 162807,
        "account": 813490,
        "ophash":
            "F77B0200B2690C00010000000E2C596E6DF63EF4123CA19C9D076BFD92802725",
        "n_operation": 1
      },
      {
        "block": 117108,
        "account": 285630,
        "ophash":
            "74C90100BE5B040086B5140086545A0AFDD880EA29D5A58EC0DF0D34BC47B09A",
        "n_operation": 1357190
      },
      {
        "block": 255033,
        "account": 1274610,
        "ophash":
            "39E40300F272130001000000C31A9382CC74A8B656B33ABD6DE63BF01C46D7C7",
        "n_operation": 1
      },
      {
        "block": 77597,
        "account": 285630,
        "ophash":
            "1D2F0100BE5B04002724050071C47BE73A7BF47B9816A45D9F19CB5F0050207F",
        "n_operation": 336935
      },
      {
        "block": 66643,
        "account": 285630,
        "ophash":
            "53040100BE5B0400549D0100E0B54073C66D13319BBE0DB4356F955D9C0E0602",
        "n_operation": 105812
      },
      {
        "block": 175254,
        "account": 285630,
        "ophash":
            "96AC0200BE5B04008D1B3700863A05EA1C2148724E0A1F0B8760856D357FD19B",
        "n_operation": 3611533
      },
      {
        "block": 160261,
        "account": 800755,
        "ophash":
            "05720200F3370C00010000008654CDE5BC7BAB05983EC459A539121FC3276BB7",
        "n_operation": 1
      },
      {
        "block": 231726,
        "account": 571630,
        "ophash":
            "2E890300EEB80800CA2D0000AF3FC5EB975D172E43CDF50375DE4A6408B74877",
        "n_operation": 11722
      },
      {
        "block": 99975,
        "account": 285630,
        "ophash":
            "87860100BE5B040060D40B00BF793A68F0BBBBE295F55F975D3FB59B0199BBAF",
        "n_operation": 775264
      },
      {
        "block": 260154,
        "account": 1299805,
        "ophash":
            "3AF803005DD513000100000050E00622DC2339EFE3AF8C3896AC80F75BD60C7A",
        "n_operation": 1
      },
      {
        "block": 59738,
        "account": 285630,
        "ophash":
            "5AE90000BE5B0400386B0000ECC49734ED0973B4C5DD3C7EDEE21E02FFD135FA",
        "n_operation": 27448
      },
      {
        "block": 68526,
        "account": 342085,
        "ophash":
            "AE0B010045380500010000007F03901A7A7A3C5C7C922E34712598D9DA83E7C8",
        "n_operation": 1
      },
      {
        "block": 195277,
        "account": 285630,
        "ophash":
            "CDFA0200BE5B0400E8464100B203C197029D8933FAAB6599160252E6D1C46ABE",
        "n_operation": 4277992
      },
      {
        "block": 280710,
        "account": 661981,
        "ophash":
            "86480400DD190A00110000000B6E978CAA4F52233C897FB392FE80050548A246",
        "n_operation": 17
      },
      {
        "block": 168536,
        "account": 126308,
        "ophash":
            "5892020064ED010007000000F104FC4708F7ECCE214F949D735737EF1D4A019C",
        "n_operation": 7
      },
      {
        "block": 233553,
        "account": 1167190,
        "ophash":
            "5190030056CF1100010000007A75F676593423A94812E3E23CF54F6E16764A67",
        "n_operation": 1
      },
      {
        "block": 68163,
        "account": 285630,
        "ophash":
            "430A0100BE5B040035FB0100024815FD4F69666A1FF90D9CC17136087313962A",
        "n_operation": 129845
      },
      {
        "block": 111932,
        "account": 285630,
        "ophash":
            "3CB50100BE5B0400D98411008347F882E45FB4E31DE1E6C79ACED29D9CCB5D74",
        "n_operation": 1148121
      },
      {
        "block": 169051,
        "account": 844695,
        "ophash":
            "5B94020097E30C0001000000978389F49EF0C8AAEAB63F2632A451014C45B4BF",
        "n_operation": 1
      },
      {
        "block": 236686,
        "account": 1182920,
        "ophash":
            "8E9C0300C80C12000100000061897271E7E64884AE7BEF47C5535A68AC2C3AFD",
        "n_operation": 1
      },
      {
        "block": 201120,
        "account": 86646,
        "ophash":
            "A0110300765201006E140000DBCE2E3463E5FD7FEB6BF72BF6D0E863EF05D9F1",
        "n_operation": 5230
      },
      {
        "block": 69512,
        "account": 290760,
        "ophash":
            "880F0100C86F04006170000085C83EBCE8DA33885A8818CAA6B1F1FCF048A7A1",
        "n_operation": 28769
      },
      {
        "block": 289396,
        "account": 1446445,
        "ophash":
            "746A04002D12160001000000E7122678E2BC9C345BE2AC64F3AC9A7019A84BBE",
        "n_operation": 1
      },
      {
        "block": 144650,
        "account": 384560,
        "ophash":
            "0A35020030DE0500020000004E6A3E95B1FAB429FF0E25DD4A1A8C36CB7A4F93",
        "n_operation": 2
      },
      {
        "block": 71260,
        "account": 355780,
        "ophash":
            "5C160100C46D05000100000002C665578F44B5980ED40DBDACB1C940E548C347",
        "n_operation": 1
      },
      {
        "block": 203501,
        "account": 1016970,
        "ophash":
            "ED1A03008A840F0001000000BA67CCC961C5D117D63D4C1F3C8B103777E23EE4",
        "n_operation": 1
      },
      {
        "block": 203251,
        "account": 1015730,
        "ophash":
            "F3190300B27F0F00010000008E23D20DEC93E8EB4724A985FE12852CEDDEE8A9",
        "n_operation": 1
      },
      {
        "block": 106213,
        "account": 285630,
        "ophash":
            "E59E0100BE5B040020710E00E63C6D7A80B0DD148BCD32140A8269EC0D3BAD05",
        "n_operation": 946464
      },
      {
        "block": 60985,
        "account": 304390,
        "ophash":
            "39EE000006A5040001000000F706DEC9E3EA773F5B2B1217E74707CA7DAD7743",
        "n_operation": 1
      },
      {
        "block": 216985,
        "account": 1084400,
        "ophash":
            "994F0300F08B1000010000008B98970042A1DCF3A5F6B04899D0C5FD9812FE1B",
        "n_operation": 1
      },
      {
        "block": 60900,
        "account": 285630,
        "ophash":
            "E4ED0000BE5B040047A30000A6BC21E517D3AF7DEE9D13F444F97EB80DC40315",
        "n_operation": 41799
      },
      {
        "block": 229390,
        "account": 571630,
        "ophash":
            "0E800300EEB808005C2D00004FDE2CB28A2C485884E7B7BC5A44D5A3B21EFB4B",
        "n_operation": 11612
      },
      {
        "block": 102737,
        "account": 285630,
        "ophash":
            "51910100BE5B0400B1CD0C00291A37EBB07CE6517F5B47A0543B0EB6DD378492",
        "n_operation": 839089
      },
      {
        "block": 84790,
        "account": 285630,
        "ophash":
            "364B0100BE5B04007E4007009938B3A091C0BB80E88E7C763FE040DE64CDFC8F",
        "n_operation": 475262
      },
      {
        "block": 216260,
        "account": 1080765,
        "ophash":
            "C44C0300BD7D1000010000006C5A83DBF3B7FB025086D9873F4E287E2FF19165",
        "n_operation": 1
      },
      {
        "block": 58934,
        "account": 285630,
        "ophash":
            "36E60000BE5B0400D9460000BACDEAE7645EE80EDC6EA8C08CEF9608C6373756",
        "n_operation": 18137
      },
      {
        "block": 204466,
        "account": 1021800,
        "ophash":
            "B21E030068970F00010000005A059C81BE705C8821F8E9BCEAD3337D0EAFF90F",
        "n_operation": 1
      },
      {
        "block": 101407,
        "account": 285630,
        "ophash":
            "1F8C0100BE5B04009E590C00D27F7ACFD113B10523D2A500CB3716F9771AF365",
        "n_operation": 809374
      },
      {
        "block": 169031,
        "account": 77,
        "ophash":
            "479402004D000000120200008E7C7927576CB27600F98F85640D5D69CB3CBBCE",
        "n_operation": 530
      },
      {
        "block": 165395,
        "account": 331889,
        "ophash":
            "138602007110050002000000A563C275A7C25E5B7C4D83CE2C803392C073194E",
        "n_operation": 2
      },
      {
        "block": 78398,
        "account": 285630,
        "ophash":
            "3E320100BE5B04003F600500D2852F8F7296BB55E74D2993AB91E0CE1549B708",
        "n_operation": 352319
      },
      {
        "block": 264717,
        "account": 6038,
        "ophash":
            "0D0A04009617000001000000E2BC62CB7BF016F8D064404488A84581138F272A",
        "n_operation": 1
      },
      {
        "block": 97460,
        "account": 285630,
        "ophash":
            "B47C0100BE5B040070060B0038E8D1BE57770C06DE486548A0018FFEA1551D45",
        "n_operation": 722544
      },
      {
        "block": 48933,
        "account": 242570,
        "ophash":
            "25BF00008AB30300010000001F567E14BCDBB928B164774E0AC362FCB9AE8EFB",
        "n_operation": 1
      },
      {
        "block": 186115,
        "account": 930040,
        "ophash":
            "03D70200F8300E00010000003F688555B86F398BECE4F2A2939DA63F6B3E7E1F",
        "n_operation": 1
      },
      {
        "block": 135945,
        "account": 679195,
        "ophash":
            "091302001B5D0A00010000000CF5E8D1E0902790E734C4DACC4591F25012EDD5",
        "n_operation": 1
      },
      {
        "block": 70418,
        "account": 285630,
        "ophash":
            "12130100BE5B040042C802007BEEBAD4E179F66C95C90CFB6478FE8EC8328E38",
        "n_operation": 182338
      },
      {
        "block": 181565,
        "account": 907290,
        "ophash":
            "3DC502001AD80D000100000033CCB3AFF81BC94520248982CDC6BFEE5340B28E",
        "n_operation": 1
      },
      {
        "block": 44216,
        "account": 218550,
        "ophash":
            "B8AC0000B65503000100000018CC7C7B947FC1701E0031AE2382ED641FD43786",
        "n_operation": 1
      },
      {
        "block": 115158,
        "account": 318320,
        "ophash":
            "D6C1010070DB040003000000FB2F7D10395860EEB8D9E473405C4134C849CA25",
        "n_operation": 3
      },
      {
        "block": 114567,
        "account": 572125,
        "ophash":
            "87BF0100DDBA08000100000085191F92C351553A52BA7771A1E7C5EBF3E7B136",
        "n_operation": 1
      },
      {
        "block": 69236,
        "account": 285630,
        "ophash":
            "740E0100BE5B0400105F02007D7D481C6FE6AEB5F27FA4A9053531052713D188",
        "n_operation": 155408
      },
      {
        "block": 78087,
        "account": 285630,
        "ophash":
            "07310100BE5B0400DD480500458EE942481D16F03A1E6650226598278E336A6D",
        "n_operation": 346333
      },
      {
        "block": 66277,
        "account": 285630,
        "ophash":
            "E5020100BE5B0400E58801002C58C245CA5B6DD5AC39215E085FE24E465B470E",
        "n_operation": 100581
      },
      {
        "block": 165529,
        "account": 827100,
        "ophash":
            "99860200DC9E0C00010000000E4708E92B1F7711D8566703D8AD3FED19AAB002",
        "n_operation": 1
      },
      {
        "block": 204759,
        "account": 938265,
        "ophash":
            "D71F030019510E005B00000080F36AFEE7FAA3E33DEDA778D2084505AF1C07D4",
        "n_operation": 91
      },
      {
        "block": 59919,
        "account": 290760,
        "ophash":
            "0FEA0000C86F04005F1D00007C8A6566E23432F0463C560AFB2D6EBB0A8C22BB",
        "n_operation": 7519
      },
      {
        "block": 180417,
        "account": 300124,
        "ophash":
            "C1C002005C940400433000004A9A5FE94F94B19DA3581D4E5F7B92A7E74FC9C2",
        "n_operation": 12355
      },
      {
        "block": 281558,
        "account": 582406,
        "ophash":
            "D64B040006E30800490000007D4828D9EE866D2C1BF0A07EC0B50AEA4175BD15",
        "n_operation": 73
      },
      {
        "block": 137464,
        "account": 285630,
        "ophash":
            "F8180200BE5B04000B462200D2B45959DF17E967BF3B8121EA6741D3C9067886",
        "n_operation": 2246155
      },
      {
        "block": 160505,
        "account": 800475,
        "ophash":
            "F9720200DB360C0005000000C8241F5C842C2C4CFED7A7F4442E800F29B1D1FD",
        "n_operation": 5
      },
      {
        "block": 96765,
        "account": 285630,
        "ophash":
            "FD790100BE5B0400CCC90A00B77431A0C685B31D42AA250804E2C427D17ADB89",
        "n_operation": 707020
      },
      {
        "block": 161997,
        "account": 809455,
        "ophash":
            "CD780200EF590C0001000000B750F65E7BDABBDC103CBDAEE19CBC8F2D9682D8",
        "n_operation": 1
      },
      {
        "block": 103739,
        "account": 285630,
        "ophash":
            "3B950100BE5B040032300D0050F71276BC6689D439B490AF9E7F94507CA4C616",
        "n_operation": 864306
      },
      {
        "block": 60091,
        "account": 285630,
        "ophash":
            "BBEA0000BE5B0400027C000084D09BACF1796444B1269C9AD98872F0F65B8063",
        "n_operation": 31746
      },
      {
        "block": 96747,
        "account": 285630,
        "ophash":
            "EB790100BE5B0400ADC70A004876B0CD8FAA81AAE9F521949A1E094E1F84D9FD",
        "n_operation": 706477
      },
      {
        "block": 146684,
        "account": 732865,
        "ophash":
            "FC3C0200C12E0B0001000000D7FE4F0D4CE6D8E80F05EE6FAA83464FBB9EA606",
        "n_operation": 1
      },
      {
        "block": 299377,
        "account": 1496365,
        "ophash":
            "719104002DD5160001000000785D54E293B2C50D7FE57A29CC29E549B3A4C21B",
        "n_operation": 1
      },
      {
        "block": 93863,
        "account": 468720,
        "ophash":
            "A76E0100F026070001000000F7706868A208A32C4E11C83CF01AE51059907CC9",
        "n_operation": 1
      },
      {
        "block": 266927,
        "account": 1320300,
        "ophash":
            "AF1204006C251400E502000031D6A1C7219D262560EAF8F5AF8607D6BBC2B232",
        "n_operation": 741
      },
      {
        "block": 249971,
        "account": 1249285,
        "ophash":
            "73D003000510130001000000BC2B8C94116FA3D4AEA1A3FD07D7AD7E852105ED",
        "n_operation": 1
      },
      {
        "block": 135148,
        "account": 332823,
        "ophash":
            "EC0F0200171405004100000020E5181760F1EA17C40FFC87BFBE771DC73F535A",
        "n_operation": 65
      },
      {
        "block": 286604,
        "account": 1432490,
        "ophash":
            "8C5F0400AADB15000100000029A02686AF586494A5D94672F9BE33399325FAF8",
        "n_operation": 1
      },
      {
        "block": 223749,
        "account": 1118200,
        "ophash":
            "056A0300F80F110001000000A179E27A0C8E20C23A98F3161168DF5AB5093222",
        "n_operation": 1
      },
      {
        "block": 190587,
        "account": 67050,
        "ophash":
            "7BE80200EA0501003B00000072A592725EBABD3DF1C34F83A93E263DC2B2F57D",
        "n_operation": 59
      },
      {
        "block": 136240,
        "account": 285630,
        "ophash":
            "30140200BE5B04000582210004F6DAFF9A8169D265230E131A76191E80F97178",
        "n_operation": 2195973
      },
      {
        "block": 170572,
        "account": 126586,
        "ophash":
            "4C9A02007AEE0100080000004E696F9BEAD389A53CFD9618EA3A23DE248553AB",
        "n_operation": 8
      },
      {
        "block": 240961,
        "account": 86646,
        "ophash":
            "41AD030076520100AA160000A88638293F8AE0F002EAF2CDA08B5DA2F0812331",
        "n_operation": 5802
      },
      {
        "block": 71084,
        "account": 168570,
        "ophash":
            "AC1501007A92020036000000E9B0EEC83BD7AB2A0537641E8DD6536083E08763",
        "n_operation": 54
      },
      {
        "block": 75834,
        "account": 285630,
        "ophash":
            "3A280100BE5B04005095040043E72AA8A9888CFF24BB5548ABF3664A3AC229AC",
        "n_operation": 300368
      },
      {
        "block": 212751,
        "account": 671468,
        "ophash":
            "0F3F0300EC3E0A0003000000493B24447042445667F08C2E65223F27AEF432CE",
        "n_operation": 3
      },
      {
        "block": 223241,
        "account": 86646,
        "ophash":
            "0968030076520100181600009D095280783348C2E51DDF30125A41C4D13FAC96",
        "n_operation": 5656
      },
      {
        "block": 146993,
        "account": 734450,
        "ophash":
            "313E0200F2340B0001000000420CEBF53F3BE40D776F3630D69E7D8A09B670C5",
        "n_operation": 1
      },
      {
        "block": 206527,
        "account": 571630,
        "ophash":
            "BF260300EEB8080005270000FFBFCB14892664E65187388A3FAF401676443453",
        "n_operation": 9989
      },
      {
        "block": 256960,
        "account": 1284260,
        "ophash":
            "C0EB0300A4981300010000007B68B39C8F505AA77296391FE4D0A09AC1BD3C1B",
        "n_operation": 1
      },
      {
        "block": 172905,
        "account": 259630,
        "ophash":
            "69A302002EF6030006000000A6CC8907BFC8DDF522B00A6881A6DD77FACB2C63",
        "n_operation": 6
      },
      {
        "block": 208131,
        "account": 1040110,
        "ophash":
            "032D0300EEDE0F0001000000A429B621D58A954CD8749DAA7E3FF32BB602289F",
        "n_operation": 1
      },
      {
        "block": 297225,
        "account": 1485620,
        "ophash":
            "0989040034AB160001000000EC725C0E4E7DE38DA0D48DDA317CF9613AC4EE47",
        "n_operation": 1
      },
      {
        "block": 206382,
        "account": 1031395,
        "ophash":
            "2E260300E3BC0F00010000006004A45FF1B9EBA46B28A26B51408B656BC8F7C6",
        "n_operation": 1
      },
      {
        "block": 179511,
        "account": 896871,
        "ophash":
            "37BD020067AF0D0001000000E130CF96B86E2E8DA390AD2147C975EF358CDA5E",
        "n_operation": 1
      },
      {
        "block": 105150,
        "account": 285630,
        "ophash":
            "BE9A0100BE5B0400DDDE0D0002CE92289F7D5D2F7012B1FBD26C29780EF16678",
        "n_operation": 909021
      },
      {
        "block": 285276,
        "account": 591320,
        "ophash":
            "5C5A0400D80509000F00000001DA436139651B8EF7A7EC0283D98D26BB26428A",
        "n_operation": 15
      },
      {
        "block": 139750,
        "account": 110027,
        "ophash":
            "E6210200CBAD01001F000000E34135897332911006913803D9B0D2F54DBB032A",
        "n_operation": 31
      },
      {
        "block": 120092,
        "account": 285630,
        "ophash":
            "1CD50100BE5B040042EE16001449BAC5979828CA234090988D0EBDA140C4A65C",
        "n_operation": 1502786
      },
      {
        "block": 157226,
        "account": 300124,
        "ophash":
            "2A6602005C94040086230000454FED24EDF145A233792AD27726DE57C373363F",
        "n_operation": 9094
      },
      {
        "block": 113250,
        "account": 285630,
        "ophash":
            "62BA0100BE5B0400873D120063BC943C5E932A53DD854D04CAB7F02EB3A2E542",
        "n_operation": 1195399
      },
      {
        "block": 163189,
        "account": 86646,
        "ophash":
            "757D020076520100820B000086F6059A89632BD66BBA71E1AFA8D90F4A0B2FE1",
        "n_operation": 2946
      },
      {
        "block": 102875,
        "account": 285630,
        "ophash":
            "DB910100BE5B04004ADB0C006AF55F9DAD8FC743DCE9E76A5BDC72DD84E5B91B",
        "n_operation": 842570
      },
      {
        "block": 271877,
        "account": 1358755,
        "ophash":
            "05260400A3BB1400010000006F7D36CC17E65CB9D55AA4FA251A304F1203812F",
        "n_operation": 1
      },
      {
        "block": 195483,
        "account": 976895,
        "ophash":
            "9BFB0200FFE70E00010000008EAD0F9D8BD2F70EE6E0713C5FF1DCDEB9AF70F0",
        "n_operation": 1
      },
      {
        "block": 74112,
        "account": 168571,
        "ophash":
            "802101007B920200690100001AD05DF2FBD70CD8EA2F2F1BDF6922EACC4E1908",
        "n_operation": 361
      },
      {
        "block": 273976,
        "account": 285630,
        "ophash":
            "382E0400BE5B0400CECD4D0074D40389572CE47DB2ABFFE9041101F2BDD0434B",
        "n_operation": 5098958
      },
      {
        "block": 176699,
        "account": 77,
        "ophash":
            "3BB202004D000000430200002042C157001FC1C7AE50573FDD25E7D06932C2FA",
        "n_operation": 579
      },
      {
        "block": 291028,
        "account": 1454620,
        "ophash":
            "D47004001C321600010000001D83CE912708A89082606F2E6761F1B83AB03676",
        "n_operation": 1
      },
      {
        "block": 139428,
        "account": 273569,
        "ophash":
            "A4200200A12C04001000000047BD0B865BEDE097AB81E218BBEDA36FB1306D8B",
        "n_operation": 16
      },
      {
        "block": 92276,
        "account": 285630,
        "ophash":
            "74680100BE5B0400304F0900C3BDA561C79E09168ABB226684EFF1699BDE3259",
        "n_operation": 610096
      },
      {
        "block": 65866,
        "account": 290760,
        "ophash":
            "4A010100C86F04004659000073CEF7C4F96CB6482A5525B2F6291EF8432CF64A",
        "n_operation": 22854
      },
      {
        "block": 270008,
        "account": 1349500,
        "ophash":
            "B81E04007C9714000100000069628DFE07124310ADB6779B5917870CB2466977",
        "n_operation": 1
      },
      {
        "block": 91346,
        "account": 456060,
        "ophash":
            "D26401007CF50600010000005675992D7EC60AB2F8E00A722D2639F76386477E",
        "n_operation": 1
      },
      {
        "block": 111388,
        "account": 192168,
        "ophash":
            "1CB30100A8EE02000300000094EFB3755715554605A8D8B24C350F32976EB7C8",
        "n_operation": 3
      },
      {
        "block": 185446,
        "account": 926720,
        "ophash":
            "66D4020000240E0001000000BC8FFD0EE461466381395DD4C1B00101F4398698",
        "n_operation": 1
      },
      {
        "block": 144019,
        "account": 285630,
        "ophash":
            "93320200BE5B0400860926001CD15BD616B6E7141E45107E0A5A2137705DC0AF",
        "n_operation": 2492806
      },
      {
        "block": 167179,
        "account": 472841,
        "ophash":
            "0B8D0200093707000A000000B3CDB2787D3098CA8A5A05AA7091E3CD43498006",
        "n_operation": 10
      },
      {
        "block": 198194,
        "account": 990445,
        "ophash":
            "32060300ED1C0F00010000006F556D9CD02BF0E2C715CA3102490FDAADE31A26",
        "n_operation": 1
      },
      {
        "block": 116676,
        "account": 571630,
        "ophash":
            "C4C70100EEB8080047000000C937111C99286440592E17D366EA7B076192079A",
        "n_operation": 71
      },
      {
        "block": 145282,
        "account": 725855,
        "ophash":
            "823702005F130B0001000000C63046CDDF7BB3B1669B18F2B97C358259167309",
        "n_operation": 1
      },
      {
        "block": 68302,
        "account": 340965,
        "ophash":
            "CE0A0100E5330500010000009EBE7CB5075B0578BBC0AE08A3816DF19FDA1F38",
        "n_operation": 1
      },
      {
        "block": 292762,
        "account": 1463260,
        "ophash":
            "9A770400DC531600010000009573DE0C18B02945D7A3055E365A18AA42655412",
        "n_operation": 1
      },
      {
        "block": 77600,
        "account": 285630,
        "ophash":
            "202F0100BE5B0400C7240500F77A89B9E5A089B8393E59D5182A568F9F77E0FE",
        "n_operation": 337095
      },
      {
        "block": 118042,
        "account": 86646,
        "ophash":
            "1ACD010076520100CE05000077EDEBB2089E78EED08FB599C9E79AD512D2A083",
        "n_operation": 1486
      },
      {
        "block": 298966,
        "account": 1494315,
        "ophash":
            "D68F04002BCD16000100000030442ECB809F1377F49E77192D0E66BA358F1FC7",
        "n_operation": 1
      },
      {
        "block": 58067,
        "account": 289805,
        "ophash":
            "D3E200000D6C04000100000095019C32A5EC2006735384B6C35A6A6CD9E8B7E0",
        "n_operation": 1
      },
      {
        "block": 120005,
        "account": 285630,
        "ophash":
            "C5D40100BE5B0400B6DC1600E051D6404FB61DE779C740D5FFF48DFCBE492B1C",
        "n_operation": 1498294
      },
      {
        "block": 115238,
        "account": 94501,
        "ophash":
            "26C201002571010005000000B738645D33DAD8FF81AA285679AEBD930EB20E5E",
        "n_operation": 5
      },
      {
        "block": 91946,
        "account": 76300,
        "ophash":
            "2A6701000C2A01000200000091B55A0BAC27F596FD1EF90EDE41A64D5D5C963F",
        "n_operation": 2
      },
      {
        "block": 180741,
        "account": 903180,
        "ophash":
            "05C202000CC80D0002000000B3AA3FE8477862DFD68C5B2434D0E47458F329E8",
        "n_operation": 2
      },
      {
        "block": 66419,
        "account": 331575,
        "ophash":
            "73030100370F050001000000CF9EAE73030817DAAD531D4BA6B87E6D230A731E",
        "n_operation": 1
      },
      {
        "block": 169444,
        "account": 207854,
        "ophash":
            "E4950200EE2B030007000000E78B2B7E4BCD3BA996B20A3570DB1579C7278ADD",
        "n_operation": 7
      },
      {
        "block": 283576,
        "account": 1417325,
        "ophash":
            "B85304006DA0150001000000F60BED19AE89964F3A38D2DF45695792368659EE",
        "n_operation": 1
      },
      {
        "block": 222016,
        "account": 86646,
        "ophash":
            "40630300765201000D1600007CAC29D3190053347BA08B124E7C30746B89D0D0",
        "n_operation": 5645
      },
      {
        "block": 91763,
        "account": 458240,
        "ophash":
            "7366010000FE06000100000028B96EAE3DE72BBED27B086FFF6A88A9E280290C",
        "n_operation": 1
      },
      {
        "block": 286503,
        "account": 819643,
        "ophash":
            "275F0400BB810C0002000000833DF0B7DCAAF5030BAA8A4C0C4537F49B02BE72",
        "n_operation": 2
      },
      {
        "block": 259299,
        "account": 1295955,
        "ophash":
            "E3F4030053C61300010000000AE0A7DF1DA7E810896469718A79BED6BD59ED70",
        "n_operation": 1
      },
      {
        "block": 261956,
        "account": 285630,
        "ophash":
            "44FF0300BE5B040021464C0056786C064E5383A85E9420DF2B2D1357B3C13252",
        "n_operation": 4998689
      },
      {
        "block": 152105,
        "account": 55095,
        "ophash":
            "2952020037D7000005000000887FCD010B3D37C4719A067D6F8BA688293A315E",
        "n_operation": 5
      },
      {
        "block": 76945,
        "account": 285630,
        "ophash":
            "912C0100BE5B040097F30400AF689F4C5591C3439B2E84EDDEA834CBF231A074",
        "n_operation": 324503
      },
      {
        "block": 143841,
        "account": 285630,
        "ophash":
            "E1310200BE5B0400A5F8250089E6D365A09A0769003FDDC9F9EAD9C6ED4AB27D",
        "n_operation": 2488485
      },
      {
        "block": 82416,
        "account": 411530,
        "ophash":
            "F04101008A47060001000000E6A873B3756D2ED10A5F7BB1350031A7AB4DC79B",
        "n_operation": 1
      },
      {
        "block": 189835,
        "account": 273710,
        "ophash":
            "8BE502002E2D0400250000009AFAFF3FED70727C022DB3C711308A6533A49117",
        "n_operation": 37
      },
      {
        "block": 300414,
        "account": 285630,
        "ophash":
            "7E950400BE5B0400676A4F00EBCE0F72FC983BF288D50D463D8E229583B410FB",
        "n_operation": 5204583
      },
      {
        "block": 85122,
        "account": 425050,
        "ophash":
            "824C01005A7C0600010000002C5166BD73151CCEBAB832715261EC8583FCBC8A",
        "n_operation": 1
      },
      {
        "block": 126650,
        "account": 285630,
        "ophash":
            "BAEE0100BE5B0400576F1B003F07B68E90D66DDA1D8C53DE1E1DF50D3C8D232C",
        "n_operation": 1797975
      },
      {
        "block": 117044,
        "account": 584700,
        "ophash":
            "34C90100FCEB080001000000DDC1909ECE9FBBA6ECD590A375B42A31F30AFEE1",
        "n_operation": 1
      },
      {
        "block": 237186,
        "account": 1185375,
        "ophash":
            "829E03005F16120001000000AC576564B2E704833BE0AC1DC64D1D17B0928F09",
        "n_operation": 1
      },
      {
        "block": 63660,
        "account": 285630,
        "ophash":
            "ACF80000BE5B04006224010015B1A21D0B260B3454B775FBF55DB109C0BEAD85",
        "n_operation": 74850
      },
      {
        "block": 108643,
        "account": 285630,
        "ophash":
            "63A80100BE5B0400CEAE0F009C4B9D7F452096D95F221F07C7FD9BE3A0BAB586",
        "n_operation": 1027790
      },
      {
        "block": 236689,
        "account": 300124,
        "ophash":
            "919C03005C940400883100008C4F8AB91710E50E1A798C6D68F3E26D542FBAB0",
        "n_operation": 12680
      },
      {
        "block": 299499,
        "account": 122202,
        "ophash":
            "EB9104005ADD0100070000009D08E63FB13698F54EAE3A0A56FE31C25FBE4C0B",
        "n_operation": 7
      },
      {
        "block": 218185,
        "account": 1090395,
        "ophash":
            "495403005BA31000010000009D7EA3A6742ED11EA662C3FEBB1437899B21FDBC",
        "n_operation": 1
      },
      {
        "block": 75206,
        "account": 290760,
        "ophash":
            "C6250100C86F04007E860000BF643C17B6A3CAA028F281D50721F4B9D6B54700",
        "n_operation": 34430
      },
      {
        "block": 217951,
        "account": 54358,
        "ophash":
            "5F53030056D400000D000000AEB66B7BDEB05199D769AB37293AFE24225CC11B",
        "n_operation": 13
      },
      {
        "block": 103462,
        "account": 285630,
        "ophash":
            "26940100BE5B04006A140D00FB862B96154EE4C2A7E65DD1DB8201BA16F06410",
        "n_operation": 857194
      },
      {
        "block": 203048,
        "account": 285630,
        "ophash":
            "28190300BE5B040041124400C50190D5D5BD25918CA8C0E04E2D4F325BFF21E1",
        "n_operation": 4461121
      },
      {
        "block": 103757,
        "account": 285630,
        "ophash":
            "4D950100BE5B040020330D00E767C90D8499073DF8982A30A6E6F38978D2E9D0",
        "n_operation": 865056
      }
    ];
  }
}


<|start_filename|>test/common/util_test.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/common.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('Common.Util', () {
    test('test hex to byte array and back', () {
      String hex =
          '67EDBC8F904091738DF33B4B6917261DB91DD9002D3985A7BA090345264A46C6';
      Uint8List byteArray = PDUtil.hexToBytes(
          '67EDBC8F904091738DF33B4B6917261DB91DD9002D3985A7BA090345264A46C6');
      expect(PDUtil.byteToHex(byteArray), hex);
    });
    test('test hex to binary and back', () {
      String hex =
          '67EDBC8F904091738DF33B4B6917261DB91DD9002D3985A7BA090345264A46C6';
      String binary = PDUtil.hexToBinary(
          '67EDBC8F904091738DF33B4B6917261DB91DD9002D3985A7BA090345264A46C6');
      expect(PDUtil.binaryToHex(binary), hex);
    });
    test('can concat one or more byte arrays', () {
      final List<Uint8List> hexas = ['ABCD', '0020', 'FFFFFFDD']
          .map((hex) => PDUtil.hexToBytes(hex))
          .toList();

      expect(PDUtil.byteToHex(PDUtil.concat(hexas)), 'ABCD0020FFFFFFDD');
    });
    test('can convert int to byte array and back', () {
      final Uint8List h = PDUtil.intToBytes(714);

      expect(PDUtil.bytesToInt(h), 714);
    });
    test('can decode and encode a bigint to little-endian byte array', () {
      BigInt a = BigInt.from(1000);
      Uint8List encoded = PDUtil.encodeBigInt(a);
      String hex = 'E803';
      expect(PDUtil.byteToHex(encoded), hex);
      expect(PDUtil.decodeBigInt(encoded), a);
    });
    test('can decode and encode a bigint to big-endian byte array', () {
      BigInt a = BigInt.from(1000);
      Uint8List encoded = PDUtil.encodeBigInt(a, endian: Endian.big);
      String hex = '03E8';
      expect(PDUtil.byteToHex(encoded), hex);
      expect(PDUtil.decodeBigInt(encoded, endian: Endian.big), a);
    });
  });
}


<|start_filename|>test/json_rpc/model/request/executeoperations_request_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.executeoperations.test', () {
    test('can serialize executeoperations', () {
      ExecuteOperationsRequest opsRequest =
          ExecuteOperationsRequest(rawOperations: 'hexastring');
      expect(json.encode(opsRequest.toJson()),
          '{"jsonrpc":"2.0","method":"executeoperations","id":0,"params":{"rawoperations":"hexastring"}}');
    });
  });
}


<|start_filename|>lib/ui/settings/security.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/model/authentication_method.dart';
import 'package:blaise_wallet_flutter/model/lock_timeout.dart';
import 'package:blaise_wallet_flutter/model/unlock_setting.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/overlay_dialog.dart';
import 'package:blaise_wallet_flutter/ui/widgets/settings_list_item.dart';
import 'package:blaise_wallet_flutter/util/authentication.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:flutter/material.dart';

class SecurityPage extends StatefulWidget {
  @override
  _SecurityPageState createState() => _SecurityPageState();
}

class _SecurityPageState extends State<SecurityPage> {
  var _scaffoldKey = GlobalKey<ScaffoldState>();

  bool _hasBiometricsEnrolled;
  AuthenticationMethod curAuthMethod =
      AuthenticationMethod(AuthMethod.BIOMETRICS);
  LockTimeoutSetting curTimeoutSetting =
      LockTimeoutSetting(LockTimeoutOption.ONE);
  UnlockSetting curAuthOnLaunch = UnlockSetting(UnlockOption.NO);

  List<DialogListItem> _getAuthMethods() {
    List<DialogListItem> ret = [];
    AuthMethod.values.forEach((AuthMethod value) {
      AuthenticationMethod method = AuthenticationMethod(value);
      ret.add(DialogListItem(
          option: method.getDisplayName(context),
          action: () async {
            await sl.get<SharedPrefsUtil>().setAuthMethod(method);
            if (mounted) {
              setState(() {
                curAuthMethod = method;
              });
            }
            Navigator.of(context).pop();
          }));
    });
    return ret;
  }

  List<DialogListItem> _authOnLaunchOptions() {
    List<DialogListItem> ret = [];
    UnlockOption.values.forEach((UnlockOption value) {
      UnlockSetting setting = UnlockSetting(value);
      ret.add(DialogListItem(
          option: setting.getDisplayName(context),
          action: () async {
            await sl
                .get<SharedPrefsUtil>()
                .setLock(setting.setting == UnlockOption.YES);
            if (mounted) {
              setState(() {
                curAuthOnLaunch = setting;
              });
            }
            Navigator.of(context).pop();
          }));
    });
    return ret;
  }

  List<DialogListItem> _getLockTimeoutList() {
    List<DialogListItem> ret = [];
    LockTimeoutOption.values.forEach((LockTimeoutOption value) {
      LockTimeoutSetting setting = LockTimeoutSetting(value);
      ret.add(DialogListItem(
          option: setting.getDisplayName(context),
          action: () async {
            await sl.get<SharedPrefsUtil>().setLockTimeout(setting);
            if (mounted) {
              setState(() {
                curTimeoutSetting = setting;
              });
            }
            Navigator.of(context).pop();
          }));
    });
    return ret;
  }

  @override
  void initState() {
    super.initState();
    _hasBiometricsEnrolled = false;
    AuthUtil().hasBiometrics().then((hasBiometrics) {
      if (mounted) {
        setState(() {
          _hasBiometricsEnrolled = hasBiometrics;
        });
      }
    });
    sl.get<SharedPrefsUtil>().getAuthMethod().then((authMethod) {
      if (mounted) {
        setState(() {
          curAuthMethod = authMethod;
        });
      }
    });
    sl.get<SharedPrefsUtil>().getLockTimeout().then((result) {
      if (mounted) {
        setState(() {
          curTimeoutSetting = result;
        });
      }
    });
    sl.get<SharedPrefsUtil>().getLock().then((result) {
      if (result) {
        if (mounted) {
          setState(() {
            curAuthOnLaunch = UnlockSetting(UnlockOption.YES);
          });
        }
      } else {
        if (mounted) {
          setState(() {
            curAuthOnLaunch = UnlockSetting(UnlockOption.NO);
          });
        }
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      key: _scaffoldKey,
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      body: LayoutBuilder(
        builder: (context, constraints) => Stack(
          children: <Widget>[
            // Container for the gradient background
            Container(
              height: 104 +
                  (MediaQuery.of(context).padding.top) +
                  (36 - (MediaQuery.of(context).padding.top) / 2),
              decoration: BoxDecoration(
                gradient: StateContainer.of(context).curTheme.gradientPrimary,
              ),
            ),
            // Column for the rest
            Column(
              children: <Widget>[
                // Container for the header and button
                Container(
                  margin: EdgeInsetsDirectional.only(
                    top: (MediaQuery.of(context).padding.top) +
                        (36 - (MediaQuery.of(context).padding.top) / 2),
                    bottom: 8,
                  ),
                  // Row for back button and the header
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      // Back Button
                      Container(
                        margin: EdgeInsetsDirectional.only(start: 2),
                        height: 50,
                        width: 50,
                        child: FlatButton(
                            highlightColor:
                                StateContainer.of(context).curTheme.textLight15,
                            splashColor:
                                StateContainer.of(context).curTheme.textLight30,
                            onPressed: () {
                              Navigator.of(context).pop();
                            },
                            shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(50.0)),
                            padding: EdgeInsets.all(0.0),
                            child: Icon(AppIcons.back,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textLight,
                                size: 24)),
                      ),
                      // The header
                      Container(
                        width: MediaQuery.of(context).size.width - 100,
                        margin: EdgeInsetsDirectional.fromSTEB(4, 0, 24, 0),
                        child: AutoSizeText(
                          AppLocalization.of(context).securityHeader,
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                        ),
                      ),
                    ],
                  ),
                ),
                // Expanded list
                Expanded(
                  // Container for the list
                  child: Container(
                    margin: EdgeInsetsDirectional.fromSTEB(12, 0, 12, 0),
                    width: double.maxFinite,
                    decoration: BoxDecoration(
                      color:
                          StateContainer.of(context).curTheme.backgroundPrimary,
                      borderRadius: BorderRadius.only(
                        topLeft: Radius.circular(12),
                        topRight: Radius.circular(12),
                      ),
                      boxShadow: [
                        StateContainer.of(context).curTheme.shadowSettingsList,
                      ],
                    ),
                    // Settings List
                    child: ListView(
                      padding: EdgeInsetsDirectional.only(
                          bottom: MediaQuery.of(context).padding.bottom + 12),
                      children: <Widget>[
                        // Preferences text
                        Container(
                          alignment: Alignment(-1, 0),
                          margin: EdgeInsetsDirectional.only(
                              start: 24, end: 24, top: 16, bottom: 8),
                          child: AutoSizeText(
                            AppLocalization.of(context).preferencesHeader,
                            style: AppStyles.settingsHeader(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                          ),
                        ),
                        // Divider
                        Container(
                          width: double.maxFinite,
                          height: 1,
                          color: StateContainer.of(context).curTheme.textDark10,
                        ),
                        // List Items
                        _hasBiometricsEnrolled
                            ? SettingsListItem(
                                header: AppLocalization.of(context)
                                    .authenticationMethodHeader,
                                subheader:
                                    curAuthMethod.getDisplayName(context),
                                icon: AppIcons.fingerprint,
                                onPressed: () {
                                  showAppDialog(
                                      context: context,
                                      builder: (_) => DialogOverlay(
                                          title: AppLocalization.of(context)
                                              .authenticationMethodHeader,
                                          optionsList: _getAuthMethods()));
                                },
                              )
                            : SizedBox(),
                        _hasBiometricsEnrolled
                            ? Container(
                                width: double.maxFinite,
                                height: 1,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textDark10,
                              )
                            : SizedBox(),
                        SettingsListItem(
                          header: AppLocalization.of(context)
                              .authenticateOnLaunchHeader,
                          subheader: curAuthOnLaunch.getDisplayName(context),
                          icon: AppIcons.lock,
                          onPressed: () {
                            showAppDialog(
                                context: context,
                                builder: (_) => DialogOverlay(
                                    title: AppLocalization.of(context)
                                        .authenticateOnLaunchHeader,
                                    optionsList: _authOnLaunchOptions()));
                          },
                        ),
                        SettingsListItem(
                          header: AppLocalization.of(context)
                              .automaticallyLockHeader,
                          subheader: curTimeoutSetting.getDisplayName(context),
                          icon: AppIcons.timer,
                          disabled: curAuthOnLaunch.setting == UnlockOption.NO,
                          onPressed: () {
                            if (curAuthOnLaunch.setting == UnlockOption.YES) {
                              showAppDialog(
                                  context: context,
                                  builder: (_) => DialogOverlay(
                                      title: AppLocalization.of(context)
                                          .automaticallyLockHeader,
                                      optionsList: _getLockTimeoutList()));
                            }
                          },
                        ),
                      ],
                    ),
                  ),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}


<|start_filename|>lib/model/available_themes.dart<|end_filename|>
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/model/setting_item.dart';
import 'package:blaise_wallet_flutter/themes.dart';
import 'package:flutter/material.dart';

enum ThemeOptions { LIGHT, DARK, COPPER }

/// Represent notification on/off setting
class ThemeSetting extends SettingSelectionItem {
  ThemeOptions theme;

  ThemeSetting(this.theme);

  String getDisplayName(BuildContext context) {
    switch (theme) {
      case ThemeOptions.DARK:
        return AppLocalization.of(context).themeDarkHeader;
      case ThemeOptions.COPPER:
        return AppLocalization.of(context).themeCopperHeader;
      case ThemeOptions.LIGHT:
      default:
        return AppLocalization.of(context).themeLightHeader;
    }
  }

  BaseTheme getTheme() {
    switch (theme) {
      case ThemeOptions.COPPER:
        return BlaiseCopperTheme();
      case ThemeOptions.DARK:
        return BlaiseDarkTheme();
      case ThemeOptions.LIGHT:
      default:
        return BlaiseLightTheme();
    }
  }

  // For saving to shared prefs
  int getIndex() {
    return theme.index;
  }
}


<|start_filename|>lib/themes.dart<|end_filename|>
import 'dart:io';

import 'package:barcode_scan/barcode_scan.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

abstract class BaseTheme {
  int themeID;

  Color primary;
  Color primary60;
  Color primary50;
  Color primary30;
  Color primary15;
  Color primary10;

  Color secondary;

  Color success;
  Color success30;
  Color success15;
  Color success10;

  Color danger;
  Color danger30;
  Color danger15;

  Color backgroundPrimary;
  Color backgroundPrimary60;
  Color backgroundPrimary30;
  Color backgroundPrimary15;

  Color backgroundSecondary;

  Color shadow;
  Color shadow50;
  Color shadow10;

  Color textDark;
  Color textDark60;
  Color textDark50;
  Color textDark40;
  Color textDark30;
  Color textDark15;
  Color textDark10;

  Color textLight;
  Color textLight30;
  Color textLight15;

  Color overlay30;
  Color overlay20;
  Color overlay15;
  Color overlay10;

  Color switchKnob;
  Color switchTrack;

  LinearGradient gradientPrimary;

  LinearGradient gradientListTop;

  BoxShadow shadowPrimaryOne;
  BoxShadow shadowPrimaryTwo;

  BoxShadow shadowSuccessOne;
  BoxShadow shadowSuccessTwo;

  BoxShadow shadowDangerOne;
  BoxShadow shadowDangerTwo;

  BoxShadow shadowSucces;

  BoxShadow shadowTextDark;
  BoxShadow shadowTextDarkTwo;

  BoxShadow shadowMainCard;

  BoxShadow shadowAccountCard;

  BoxShadow shadowBottomBar;

  BoxShadow shadowSettingsList;

  String illustrationNewWallet;
  String illustrationBackup;
  String illustrationTwoOptions;
  String illustrationBorrowed;
  String illustrationSecurity;

  String animationWelcome;
  String animationSend;
  String animationNameChange;
  String animationSale;
  String animationTransfer;
  String animationGetAccount;
  String animationSearch;

  Brightness brightness;
  SystemUiOverlayStyle statusBar;
  AppIconEnum appIcon;
  OverlayTheme scannerTheme;

  /// Operator overrides
  bool operator ==(o) => (o != null && o.hashCode == hashCode);
  int get hashCode => themeID.hashCode;
}

class BlaiseLightTheme extends BaseTheme {
  int themeID = 1;

  static const Color orange = Color(0xFFF7941F);
  static const Color yellow = Color(0xFFFCC642);
  static const Color teal = Color(0xFF00C5C3);
  static const Color red = Color(0xFFFF6C59);
  static const Color white = Color(0xFFFFFFFF);
  static const Color white00 = Color(0x00FFFFFF);
  static const Color grayDark = Color(0xFF6B6C71);
  static const Color black = Color(0xFF000000);

  Color primary = orange;
  Color primary60 = orange.withOpacity(0.6);
  Color primary50 = orange.withOpacity(0.5);
  Color primary30 = orange.withOpacity(0.3);
  Color primary15 = orange.withOpacity(0.15);
  Color primary10 = orange.withOpacity(0.10);

  Color secondary = yellow;

  Color success = teal;
  Color success30 = teal.withOpacity(0.3);
  Color success15 = teal.withOpacity(0.15);
  Color success10 = teal.withOpacity(0.1);

  Color danger = red;
  Color danger30 = red.withOpacity(0.3);
  Color danger15 = red.withOpacity(0.15);

  Color backgroundPrimary = white;
  Color backgroundPrimary60 = white.withOpacity(0.6);
  Color backgroundPrimary30 = white.withOpacity(0.3);
  Color backgroundPrimary15 = white.withOpacity(0.15);

  Color backgroundSecondary = white;

  Color textDark = grayDark;
  Color textDark60 = grayDark.withOpacity(0.6);
  Color textDark50 = grayDark.withOpacity(0.5);
  Color textDark40 = grayDark.withOpacity(0.4);
  Color textDark30 = grayDark.withOpacity(0.3);
  Color textDark15 = grayDark.withOpacity(0.15);
  Color textDark10 = grayDark.withOpacity(0.1);

  Color shadow = grayDark;
  Color shadow50 = grayDark.withOpacity(0.5);
  Color shadow10 = grayDark.withOpacity(0.1);

  Color textLight = white;
  Color textLight30 = white.withOpacity(0.3);
  Color textLight15 = white.withOpacity(0.15);

  Color overlay30 = black.withOpacity(0.3);
  Color overlay20 = black.withOpacity(0.2);
  Color overlay15 = black.withOpacity(0.15);
  Color overlay10 = black.withOpacity(0.10);

  Color switchKnob = white;
  Color switchTrack = black.withOpacity(0.1);

  LinearGradient gradientPrimary = LinearGradient(
    begin: Alignment.bottomLeft,
    end: Alignment.topRight,
    stops: [0.0, 1],
    colors: [orange, yellow],
  );

  LinearGradient gradientListTop = LinearGradient(
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
    stops: [0.0, 1],
    colors: [white, white00],
  );

  BoxShadow shadowPrimaryOne = BoxShadow(
      color: orange.withOpacity(0.5),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowPrimaryTwo = BoxShadow(
      color: orange.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  BoxShadow shadowSuccessOne = BoxShadow(
      color: teal.withOpacity(0.5),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowSuccessTwo = BoxShadow(
      color: teal.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowSuccess = BoxShadow(
      color: teal.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowTextDark = BoxShadow(
      color: grayDark.withOpacity(0.15),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  BoxShadow shadowTextDarkTwo = BoxShadow(
      color: grayDark.withOpacity(0.25),
      offset: Offset(0, 12),
      blurRadius: 24,
      spreadRadius: -4.0);

  BoxShadow shadowMainCard = BoxShadow(
      color: grayDark.withOpacity(0.2),
      offset: Offset(0, 10),
      blurRadius: 20,
      spreadRadius: -3.3);

  BoxShadow shadowAccountCard = BoxShadow(
      color: grayDark.withOpacity(0.15),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -2.6);

  BoxShadow shadowBottomBar = BoxShadow(
      color: grayDark.withOpacity(0.2),
      offset: Offset(0, -15),
      blurRadius: 30,
      spreadRadius: -5.0);

  BoxShadow shadowSettingsList = BoxShadow(
      color: grayDark.withOpacity(0.4),
      offset: Offset(0, 10),
      blurRadius: 30,
      spreadRadius: -5.0);

  BoxShadow shadowDangerOne = BoxShadow(
      color: red.withOpacity(0.5),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  BoxShadow shadowDangerTwo = BoxShadow(
      color: red.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  String illustrationNewWallet = 'assets/illustration_new_wallet.svg';
  String illustrationBackup = 'assets/illustration_backup.svg';
  String illustrationTwoOptions = 'assets/illustration_two_options.svg';
  String illustrationBorrowed = 'assets/illustration_borrowed.svg';
  String illustrationSecurity = 'assets/illustration_security.svg';

  String animationWelcome = 'assets/animation_welcome.flr';
  String animationSend = 'assets/animation_send.flr';
  String animationNameChange = 'assets/animation_name_change.flr';
  String animationSale = 'assets/animation_sale.flr';
  String animationTransfer = 'assets/animation_transfer.flr';
  String animationGetAccount = 'assets/animation_get_account.flr';
  String animationSearch = 'assets/animation_search.flr';

  Brightness brightness = Brightness.dark;
  SystemUiOverlayStyle statusBar =
      SystemUiOverlayStyle.light.copyWith(statusBarColor: Colors.transparent);
  
  AppIconEnum appIcon = AppIconEnum.LIGHT;

  OverlayTheme scannerTheme = OverlayTheme.BLAISE;
}

class BlaiseDarkTheme extends BaseTheme {
  int themeID = 2;

  static const Color blueish = Color(0xFF8287B5);
  static const Color blueish2 = Color(0xFF6F70A8);
  static const Color blueishLight = Color(0xFFACB7D1);
  static const Color green = Color(0xFF7CBFA1);
  static const Color red = Color(0xFFCC7A7A);
  static const Color white = Color(0xFFFFFFFF);
  static const Color white00 = Color(0x00FFFFFF);
  static const Color grayLight = Color(0xFFB5B5BF);
  static const Color grayLightish = Color(0xFF2D3136);
  static const Color grayDark = Color(0xFF1C1E21);
  static const Color grayDark00 = Color(0x001C1E21);
  static const Color black = Color(0xFF000000);

  Color primary = blueish;
  Color primary60 = blueish.withOpacity(0.6);
  Color primary50 = blueish.withOpacity(0.5);
  Color primary30 = blueish.withOpacity(0.3);
  Color primary15 = blueish.withOpacity(0.15);
  Color primary10 = blueish.withOpacity(0.10);

  Color secondary = blueishLight;

  Color success = green;
  Color success30 = green.withOpacity(0.3);
  Color success15 = green.withOpacity(0.15);
  Color success10 = green.withOpacity(0.1);

  Color danger = red;
  Color danger30 = red.withOpacity(0.3);
  Color danger15 = red.withOpacity(0.15);

  Color backgroundPrimary = grayDark;
  Color backgroundPrimary60 = grayDark.withOpacity(0.6);
  Color backgroundPrimary30 = grayDark.withOpacity(0.3);
  Color backgroundPrimary15 = grayDark.withOpacity(0.15);

  Color backgroundSecondary = grayDark;

  Color textDark = grayLight;
  Color textDark60 = grayLight.withOpacity(0.6);
  Color textDark50 = grayLight.withOpacity(0.5);
  Color textDark40 = grayLight.withOpacity(0.4);
  Color textDark30 = grayLight.withOpacity(0.3);
  Color textDark15 = grayLight.withOpacity(0.15);
  Color textDark10 = grayLight.withOpacity(0.1);

  Color shadow = black;
  Color shadow50 = black.withOpacity(0.5);
  Color shadow10 = black.withOpacity(0.1);

  Color textLight = grayDark;
  Color textLight30 = grayDark.withOpacity(0.3);
  Color textLight15 = grayDark.withOpacity(0.15);

  Color overlay30 = black.withOpacity(0.3);
  Color overlay20 = black.withOpacity(0.2);
  Color overlay15 = black.withOpacity(0.15);
  Color overlay10 = black.withOpacity(0.10);

  Color switchKnob = grayLightish;
  Color switchTrack = black.withOpacity(0.3);

  LinearGradient gradientPrimary = LinearGradient(
    begin: Alignment.bottomLeft,
    end: Alignment.topRight,
    stops: [0.0, 1],
    colors: [blueish2, blueishLight],
  );

  LinearGradient gradientListTop = LinearGradient(
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
    stops: [0.0, 1],
    colors: [grayDark, grayDark00],
  );

  BoxShadow shadowPrimaryOne = BoxShadow(
      color: blueish.withOpacity(0.1),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowPrimaryTwo = BoxShadow(
      color: blueish.withOpacity(0.05),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  BoxShadow shadowSuccessOne = BoxShadow(
      color: green.withOpacity(0.1),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowSuccessTwo = BoxShadow(
      color: green.withOpacity(0.05),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowTextDark = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  BoxShadow shadowTextDarkTwo = BoxShadow(
      color: black.withOpacity(0.35),
      offset: Offset(0, 12),
      blurRadius: 24,
      spreadRadius: -4.0);

  BoxShadow shadowMainCard = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, 10),
      blurRadius: 20,
      spreadRadius: -3.3);

  BoxShadow shadowAccountCard = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -2.6);

  BoxShadow shadowBottomBar = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, -15),
      blurRadius: 30,
      spreadRadius: -5.0);

  BoxShadow shadowSettingsList = BoxShadow(
      color: black.withOpacity(0.5),
      offset: Offset(0, 10),
      blurRadius: 30,
      spreadRadius: -5.0);

  BoxShadow shadowDangerOne = BoxShadow(
      color: red.withOpacity(0.1),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  BoxShadow shadowDangerTwo = BoxShadow(
      color: red.withOpacity(0.05),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  String illustrationNewWallet = 'assets/illustration_new_wallet_dark.svg';
  String illustrationBackup = 'assets/illustration_backup_dark.svg';
  String illustrationTwoOptions = 'assets/illustration_two_options_dark.svg';
  String illustrationBorrowed = 'assets/illustration_borrowed_dark.svg';
  String illustrationSecurity = 'assets/illustration_security_dark.svg';

  String animationWelcome = 'assets/animation_welcome_dark.flr';
  String animationSend = 'assets/animation_send_dark.flr';
  String animationNameChange = 'assets/animation_name_change_dark.flr';
  String animationSale = 'assets/animation_sale_dark.flr';
  String animationTransfer = 'assets/animation_transfer_dark.flr';
  String animationGetAccount = 'assets/animation_get_account_dark.flr';
  String animationSearch = 'assets/animation_search.flr';

  Brightness brightness = Brightness.light;
  SystemUiOverlayStyle statusBar =
      SystemUiOverlayStyle.dark.copyWith(statusBarColor: Colors.transparent);
  
  AppIconEnum appIcon = AppIconEnum.DARK;

  OverlayTheme scannerTheme = OverlayTheme.BLAISEDARK;
}

class BlaiseCopperTheme extends BaseTheme {
  int themeID = 3;

  static const Color orange = Color(0xFFDD8D52);
  static const Color orange2 = Color(0xFFCB7244);
  static const Color orangeLight = Color(0xFFFFBF6A);
  static const Color blue = Color(0xFF5A73F2);
  static const Color red = Color(0xFFF25A5A);
  static const Color white = Color(0xFFFFFFFF);
  static const Color white00 = Color(0x00FFFFFF);
  static const Color grayLight = Color(0xFFB9BAC4);
  static const Color grayLightish = Color(0xFF585A6F);
  static const Color grayDark = Color(0xFF2B2C37);
  static const Color grayDark00 = Color(0x002B2C37);
  static const Color black = Color(0xFF000000);

  Color primary = orange;
  Color primary60 = orange.withOpacity(0.6);
  Color primary50 = orange.withOpacity(0.5);
  Color primary30 = orange.withOpacity(0.3);
  Color primary15 = orange.withOpacity(0.15);
  Color primary10 = orange.withOpacity(0.10);

  Color secondary = orangeLight;

  Color success = blue;
  Color success30 = blue.withOpacity(0.3);
  Color success15 = blue.withOpacity(0.15);
  Color success10 = blue.withOpacity(0.1);

  Color danger = red;
  Color danger30 = red.withOpacity(0.3);
  Color danger15 = red.withOpacity(0.15);

  Color backgroundPrimary = grayDark;
  Color backgroundPrimary60 = grayDark.withOpacity(0.6);
  Color backgroundPrimary30 = grayDark.withOpacity(0.3);
  Color backgroundPrimary15 = grayDark.withOpacity(0.15);

  Color backgroundSecondary = grayDark;

  Color textDark = grayLight;
  Color textDark60 = grayLight.withOpacity(0.6);
  Color textDark50 = grayLight.withOpacity(0.5);
  Color textDark40 = grayLight.withOpacity(0.4);
  Color textDark30 = grayLight.withOpacity(0.3);
  Color textDark15 = grayLight.withOpacity(0.15);
  Color textDark10 = grayLight.withOpacity(0.1);

  Color shadow = black;
  Color shadow50 = black.withOpacity(0.5);
  Color shadow10 = black.withOpacity(0.1);

  Color textLight = grayDark;
  Color textLight30 = grayDark.withOpacity(0.3);
  Color textLight15 = grayDark.withOpacity(0.15);

  Color overlay30 = black.withOpacity(0.3);
  Color overlay20 = black.withOpacity(0.2);
  Color overlay15 = black.withOpacity(0.15);
  Color overlay10 = black.withOpacity(0.10);

  Color switchKnob = grayLightish;
  Color switchTrack = black.withOpacity(0.3);

  LinearGradient gradientPrimary = LinearGradient(
    begin: Alignment.bottomLeft,
    end: Alignment.topRight,
    stops: [0.0, 1],
    colors: [orange2, orangeLight],
  );

  LinearGradient gradientListTop = LinearGradient(
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
    stops: [0.0, 1],
    colors: [grayDark, grayDark00],
  );

  BoxShadow shadowPrimaryOne = BoxShadow(
      color: orange.withOpacity(0.1),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowPrimaryTwo = BoxShadow(
      color: orange.withOpacity(0.05),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  BoxShadow shadowSuccessOne = BoxShadow(
      color: blue.withOpacity(0.1),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowSuccessTwo = BoxShadow(
      color: blue.withOpacity(0.05),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  BoxShadow shadowTextDark = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  
  BoxShadow shadowTextDarkTwo = BoxShadow(
      color: black.withOpacity(0.35),
      offset: Offset(0, 12),
      blurRadius: 24,
      spreadRadius: -4.0);

  BoxShadow shadowMainCard = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, 10),
      blurRadius: 20,
      spreadRadius: -3.3);

  BoxShadow shadowAccountCard = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -2.6);

  BoxShadow shadowBottomBar = BoxShadow(
      color: black.withOpacity(0.25),
      offset: Offset(0, -15),
      blurRadius: 30,
      spreadRadius: -5.0);

  BoxShadow shadowSettingsList = BoxShadow(
      color: black.withOpacity(0.5),
      offset: Offset(0, 10),
      blurRadius: 30,
      spreadRadius: -5.0);

  BoxShadow shadowDangerOne = BoxShadow(
      color: red.withOpacity(0.1),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);
  BoxShadow shadowDangerTwo = BoxShadow(
      color: red.withOpacity(0.05),
      offset: Offset(0, 8),
      blurRadius: 16,
      spreadRadius: -4.0);

  String illustrationNewWallet = 'assets/illustration_new_wallet_copper.svg';
  String illustrationBackup = 'assets/illustration_backup_copper.svg';
  String illustrationTwoOptions = 'assets/illustration_two_options_copper.svg';
  String illustrationBorrowed = 'assets/illustration_borrowed_copper.svg';
  String illustrationSecurity = 'assets/illustration_security_copper.svg';

  String animationWelcome = 'assets/animation_welcome_copper.flr';
  String animationSend = 'assets/animation_send_copper.flr';
  String animationNameChange = 'assets/animation_name_change_copper.flr';
  String animationSale = 'assets/animation_sale_copper.flr';
  String animationTransfer = 'assets/animation_transfer_copper.flr';
  String animationGetAccount = 'assets/animation_get_account_copper.flr';
  String animationSearch = 'assets/animation_search.flr';

  Brightness brightness = Brightness.light;
  SystemUiOverlayStyle statusBar =
      SystemUiOverlayStyle.dark.copyWith(statusBarColor: Colors.transparent);

  AppIconEnum appIcon = AppIconEnum.COPPER;

  OverlayTheme scannerTheme = OverlayTheme.COPPER;
}

enum AppIconEnum { LIGHT, DARK, COPPER }
class AppIcon {
  static const _channel = const MethodChannel('fappchannel');

  static Future<void> setAppIcon(AppIconEnum iconToChange) async {
    if (!Platform.isIOS) {
      return null;
    }
    String iconStr = "Light";
    switch (iconToChange) {
      case AppIconEnum.DARK:
        iconStr = "Dark";
        break;
      case AppIconEnum.COPPER:
        iconStr = "Copper";
        break;
      case AppIconEnum.LIGHT:
      default:
        iconStr = "Light";
        break;
    }
    final Map<String, dynamic> params = <String, dynamic>{
     'icon': iconStr,
    };
    return await _channel.invokeMethod('changeIcon', params);
  }
}

<|start_filename|>test/json_rpc/model/request/getaccountoperations_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.getaccountoperations.test', () {
    test('can serialize getaccountoperations', () {
      GetAccountOperationsRequest opsRequest =
          GetAccountOperationsRequest(account: 1234);
      expect(json.encode(opsRequest.toJson()),
          '{"jsonrpc":"2.0","method":"getaccountoperations","id":0,"params":{"account":1234}}');
    });
  });
}


<|start_filename|>lib/bus/events.dart<|end_filename|>
export 'authenticated_event.dart';
export 'contact_modified_event.dart';
export 'contact_added_event.dart';
export 'contact_removed_event.dart';
export 'update_history_event.dart';
export 'daemon_changed_event.dart';
export 'payload_changed_event.dart';
export 'disable_lock_timeout_event.dart';
export 'conn_status_event.dart';
export 'subscribe_event.dart';
export 'price_event.dart';
export 'new_operation_event.dart';

<|start_filename|>lib/ui/intro/intro_import_private_key.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/formatters.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/util/routes.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/overlay_dialog.dart';
import 'package:blaise_wallet_flutter/ui/widgets/pin_screen.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/user_data_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:pascaldart/pascaldart.dart';

class IntroImportPrivateKeyPage extends StatefulWidget {
  @override
  _IntroImportPrivateKeyPageState createState() =>
      _IntroImportPrivateKeyPageState();
}

class _IntroImportPrivateKeyPageState extends State<IntroImportPrivateKeyPage> {
  FocusNode privateKeyFocusNode;
  TextEditingController privateKeyController;
  bool _showPrivateKeyError;
  bool _privateKeyValid;

  @override
  void initState() {
    super.initState();
    privateKeyFocusNode = FocusNode();
    privateKeyController = TextEditingController();
    _showPrivateKeyError = false;
    _privateKeyValid = false;
  }

  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
        resizeToAvoidBottomPadding: false,
        backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
        body: TapOutsideUnfocus(
            child: LayoutBuilder(
          builder: (context, constraints) => Column(
            children: <Widget>[
              //A widget that holds welcome animation + paragraph
              Expanded(
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    // Container for the header
                    Container(
                      padding: EdgeInsetsDirectional.only(
                        top: (MediaQuery.of(context).padding.top) +
                            (24 - (MediaQuery.of(context).padding.top) / 2),
                      ),
                      decoration: BoxDecoration(
                        gradient:
                            StateContainer.of(context).curTheme.gradientPrimary,
                      ),
                      // Row for back button and the header
                      child: Row(
                        children: <Widget>[
                          // The header
                          Container(
                            width: MediaQuery.of(context).size.width - 60,
                            margin:
                                EdgeInsetsDirectional.fromSTEB(30, 24, 30, 24),
                            child: AutoSizeText(
                              AppLocalization.of(context)
                                  .importPrivateKeyHeader,
                              style: AppStyles.header(context),
                              maxLines: 1,
                              stepGranularity: 0.1,
                            ),
                          ),
                        ],
                      ),
                    ),
                    //Container for the paragraph
                    Container(
                      margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 20),
                      alignment: Alignment(-1, 0),
                      child: AutoSizeText(
                        AppLocalization.of(context).importPrivateKeyParagraph,
                        maxLines: 2,
                        stepGranularity: 0.1,
                        style: AppStyles.paragraph(context),
                      ),
                    ),
                    Expanded(
                      child: KeyboardAvoider(
                        duration: Duration(milliseconds: 0),
                        autoScroll: true,
                        focusPadding: 40,
                        child: Column(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            // Container for the text field
                            Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 10, 30, 0),
                                child: AppTextField(
                                  label: AppLocalization.of(context)
                                      .privateKeyTextFieldHeader,
                                  style: _privateKeyValid
                                      ? AppStyles.privateKeyPrimary(context)
                                      : AppStyles.privateKeyTextDark(context),
                                  focusNode: privateKeyFocusNode,
                                  controller: privateKeyController,
                                  maxLines: 1,
                                  firstButton: TextFieldButton(
                                    icon: AppIcons.paste,
                                    onPressed: () {
                                      Clipboard.getData("text/plain")
                                          .then((cdata) {
                                        if (privateKeyIsValid(cdata.text) ||
                                            privateKeyIsEncrypted(cdata.text)) {
                                          privateKeyController.text =
                                              cdata.text;
                                          onKeyTextChanged(
                                              privateKeyController.text);
                                        }
                                      });
                                    },
                                  ),
                                  secondButton: TextFieldButton(
                                    icon: AppIcons.scan,
                                    onPressed: () async {
                                      String text =
                                          await UserDataUtil.getQRData(
                                              DataType.RAW,
                                              StateContainer.of(context).curTheme.scannerTheme);
                                      if (text != null) {
                                        if (privateKeyIsValid(text) ||
                                            privateKeyIsEncrypted(text)) {
                                          privateKeyController.text = text;
                                          onKeyTextChanged(
                                              privateKeyController.text);
                                        }
                                      }
                                    },
                                  ),
                                  inputFormatters: [
                                    WhitelistingTextInputFormatter(RegExp(
                                        "[a-fA-F0-9]")), // Hex characters
                                    UpperCaseTextFormatter()
                                  ],
                                  textCapitalization:
                                      TextCapitalization.characters,
                                  onChanged: onKeyTextChanged,
                                )),
                            // Error text
                            Container(
                              margin: EdgeInsetsDirectional.only(
                                  start: 30, end: 30, top: 4, bottom: 40),
                              child: AutoSizeText(
                                _showPrivateKeyError
                                    ? AppLocalization.of(context)
                                        .invalidPrivateKeyError
                                    : "",
                                style: AppStyles.paragraphPrimary(context),
                                textAlign: TextAlign.start,
                              ),
                            )
                          ],
                        ),
                      ),
                    ),
                  ],
                ),
              ),

              // "Import" button
              Row(
                children: <Widget>[
                  AppButton(
                    type: AppButtonType.Primary,
                    text: AppLocalization.of(context).importButton,
                    buttonTop: true,
                    onPressed: () {
                      validateAndSubmit();
                    },
                  ),
                ],
              ),
              // "Go Back" button
              Row(
                children: <Widget>[
                  AppButton(
                    type: AppButtonType.PrimaryOutline,
                    text: AppLocalization.of(context).goBackButton,
                    onPressed: () {
                      Navigator.of(context).pop();
                    },
                  ),
                ],
              ),
            ],
          ),
        )));
  }

  bool privateKeyIsValid(String pkText) {
    try {
      PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(pkText));
      return true;
    } catch (e) {
      return false;
    }
  }

  bool privateKeyIsEncrypted(String pkText, {bool lengthCheck = true}) {
    int minLength = lengthCheck ? 100 : 8;
    if (pkText == null || pkText.length < minLength) {
      return false;
    }
    try {
      String salted =
          PDUtil.bytesToUtf8String(PDUtil.hexToBytes(pkText.substring(0, 16)));
      if (salted == "Salted__") {
        return true;
      }
      return false;
    } catch (e) {
      return false;
    }
  }

  void onKeyTextChanged(String newText) {
    if (privateKeyIsValid(newText)) {
      setState(() {
        _privateKeyValid = true;
        _showPrivateKeyError = false;
      });
    } else {
      setState(() {
        _privateKeyValid = false;
        _showPrivateKeyError = false;
      });
    }
  }

  void validateAndSubmit() {
    if (privateKeyIsValid(privateKeyController.text)) {
      if (!PrivateKeyCoder()
          .decodeFromBytes(PDUtil.hexToBytes(privateKeyController.text))
          .curve
          .supported) {
        showAppDialog(
            context: context,
            builder: (_) => DialogOverlay(
                  title: AppLocalization.of(context).keyTypeNotSupportedHeader,
                  warningStyle: true,
                  confirmButtonText: AppLocalization.of(context).okayGoBackButton,
                  body: TextSpan(
                    children: [
                      TextSpan(
                        text:
                            AppLocalization.of(context).keyTypeNotSupportedParagraph,
                        style: AppStyles.paragraph(context),
                      )
                    ],
                  ),
                  onConfirm: () {
                    Navigator.of(context)
                        .popUntil(RouteUtils.withNameLike('/intro_welcome'));
                  },
                ));
        return;
      }
      sl
          .get<Vault>()
          .setPrivateKey(PrivateKeyCoder()
              .decodeFromBytes(PDUtil.hexToBytes(privateKeyController.text)))
          .then((_) {
        sl.get<SharedPrefsUtil>().setPrivateKeyBackedUp(true).then((_) {
          Navigator.of(context)
              .push(MaterialPageRoute(builder: (BuildContext context) {
            return PinScreen(
                type: PinOverlayType.NEW_PIN,
                onSuccess: (pin) {
                  sl.get<Vault>().setPin(pin).then((_) {
                    walletState.requestUpdate();
                    Navigator.of(context).pushNamedAndRemoveUntil(
                        '/overview', (Route<dynamic> route) => false);
                  });
                });
          }));
        });
      });
    } else if (privateKeyIsEncrypted(privateKeyController.text)) {
      Navigator.of(context).pushNamed('/intro_decrypt_and_import_private_key',
          arguments: privateKeyController.text);
    } else {
      setState(() {
        _showPrivateKeyError = true;
      });
    }
  }
}


<|start_filename|>lib/util/number_util.dart<|end_filename|>
import 'dart:math';

import 'package:decimal/decimal.dart';

class NumberUtil {
  static const int maxDecimalDigits = 4;

  /// Truncate a Decimal to a specific amount of digits
  ///
  /// @param input 1.059
  /// @return double value 1.05
  ///
  static double truncateDecimal(Decimal input, {int digits = maxDecimalDigits}) {
    return (input * Decimal.fromInt(pow(10, digits))).truncateToDouble() / pow(10, digits);
  }

  /// Sanitize a number as something that can actually
  /// be parsed. Expects "." to be decimal separator
  /// @param amount $1,512
  /// @returns 1.512
  static String sanitizeNumber(String input, {int maxDecimalDigits = maxDecimalDigits}) {
    String sanitized = "";
    List<String> splitStr = input.split(".");
    if (splitStr.length > 1) {
      if (splitStr[1].length > maxDecimalDigits) {
        splitStr[1] = splitStr[1].substring(0, maxDecimalDigits);
        input = splitStr[0] + "." + splitStr[1];
      }
    }
    for (int i=0; i< input.length; i++) {
      try {
        if (input[i] == ".") {
          sanitized = sanitized + input[i];
        } else {
          int.parse(input[i]);
          sanitized = sanitized + input[i];
        }
      } catch (e) { }
    }
    return sanitized;
  }
}

<|start_filename|>lib/network/model/response/accounts_response_borrowed.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/response/borrow_response.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:pascaldart/pascaldart.dart';

part 'accounts_response_borrowed.g.dart';

@JsonSerializable()
class AccountsResponseBorrowed extends AccountsResponse {
  @JsonKey(name: 'borrowed_account')
  BorrowResponse borrowedAccount;

  @JsonKey(name: 'borrow_eligible')
  bool borrowEligible;

  AccountsResponseBorrowed({this.borrowedAccount, this.borrowEligible}) : super();

  factory AccountsResponseBorrowed.fromJson(Map<String, dynamic> json) => _$AccountsResponseBorrowedFromJson(json);
  Map<String, dynamic> toJson() => _$AccountsResponseBorrowedToJson(this);
}

<|start_filename|>lib/ui/settings/public_key_sheet.dart<|end_filename|>
import 'dart:async';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:pascaldart/pascaldart.dart';

class PublicKeySheet extends StatefulWidget {
  _PublicKeySheetState createState() => _PublicKeySheetState();
}

class _PublicKeySheetState extends State<PublicKeySheet> {
  bool _keyCopied;
  Timer _keyCopiedTimer;

  @override
  void initState() {
    super.initState();
    _keyCopied = false;
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  height: 60,
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient:
                        StateContainer.of(context).curTheme.gradientPrimary,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                      // Header
                      Container(
                        width: MediaQuery.of(context).size.width - 130,
                        alignment: Alignment(0, 0),
                        child: AutoSizeText(
                          toUppercase(AppLocalization.of(context)
                              .publicKeySheetHeader
                              ,context),
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          textAlign: TextAlign.center,
                        ),
                      ),
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      // Paragraph
                      Container(
                        margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                        child: AutoSizeText(
                          AppLocalization.of(context).publicKeyParagraph,
                          stepGranularity: 0.5,
                          maxLines: 6,
                          minFontSize: 8,
                          style: AppStyles.paragraph(context),
                        ),
                      ),
                      // Container for the private key
                      Container(
                          margin: EdgeInsetsDirectional.fromSTEB(30, 24, 30, 0),
                          padding:
                              EdgeInsetsDirectional.fromSTEB(30, 12, 30, 12),
                          decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(12),
                            border: Border.all(
                                width: 1,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .primary15),
                            color:
                                StateContainer.of(context).curTheme.primary10,
                          ),
                          child: Observer(builder: (BuildContext context) {
                            if (walletState.publicKey != null) {
                              return AutoSizeText(
                                PublicKeyCoder()
                                    .encodeToBase58(walletState.publicKey),
                                maxLines: 6,
                                stepGranularity: 0.1,
                                minFontSize: 8,
                                textAlign: TextAlign.center,
                                style: AppStyles.privateKeyPrimary(context),
                              );
                            } else {
                              return SizedBox();
                            }
                          })),
                    ],
                  ),
                ),
                //"Copy Unencrypted Key" and "Close" buttons
                Row(
                  children: <Widget>[
                    AppButton(
                      type: _keyCopied
                          ? AppButtonType.Success
                          : AppButtonType.Primary,
                      text: _keyCopied
                          ? AppLocalization.of(context).keyCopiedButton
                          : AppLocalization.of(context).copyPublicKeyButton,
                      buttonTop: true,
                      onPressed: () {
                        if (walletState.publicKey != null) {
                          Clipboard.setData(ClipboardData(
                              text: PublicKeyCoder()
                                  .encodeToBase58(walletState.publicKey)));
                        }
                        setState(() {
                          _keyCopied = true;
                        });
                        if (_keyCopiedTimer != null) {
                          _keyCopiedTimer.cancel();
                        }
                        _keyCopiedTimer =
                            Timer(const Duration(milliseconds: 1500), () {
                          if (mounted) {
                            setState(() {
                              _keyCopied = false;
                            });
                          }
                        });
                      },
                    ),
                  ],
                ),
                // "Close" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.PrimaryOutline,
                      text: AppLocalization.of(context).closeButton,
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}


<|start_filename|>lib/network/model/request/freepasa_get_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';

part 'freepasa_get_request.g.dart';

@JsonSerializable()
class FreePASAGetRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'phone_iso')
  String phoneIso;

  @JsonKey(name:'phone_number')
  String phoneNumber;

  @JsonKey(name:'b58_pubkey')
  String b58pubkey;


  FreePASAGetRequest({@required this.phoneIso, @required this.phoneNumber, @required this.b58pubkey}) : super() {
    this.action = 'freepasa_get';
  }

  factory FreePASAGetRequest.fromJson(Map<String, dynamic> json) => _$FreePASAGetRequestFromJson(json);
  Map<String, dynamic> toJson() => _$FreePASAGetRequestToJson(this);
}

<|start_filename|>lib/ui/overview/get_free_account_sheet.dart<|end_filename|>
import 'dart:convert';
import 'dart:ui';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/network/http_client.dart';
import 'package:blaise_wallet_flutter/ui/overview/confirm_free_account_sheet.dart';
import 'package:blaise_wallet_flutter/ui/util/formatters.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/error_container.dart';
import 'package:blaise_wallet_flutter/ui/widgets/sheets.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:pascaldart/pascaldart.dart';

class CountryCode {
  String isoCode;
  String displayName;

  CountryCode({@required this.isoCode, @required this.displayName});

  static List<CountryCode> fromJsonList(List<dynamic> jsonList) {
    return jsonList.map((e) => CountryCode.fromJson(e)).toList();
  }

  factory CountryCode.fromJson(Map<String, dynamic> json) {
    return CountryCode(
      isoCode: json['iso'],
      displayName: json['text']
    );
  }
}

class GetFreeAccountSheet extends StatefulWidget {
  _GetFreeAccountSheetState createState() => _GetFreeAccountSheetState();
}

class _GetFreeAccountSheetState extends State<GetFreeAccountSheet> {
  List<CountryCode> _countryCodes;
  CountryCode _selectedCountry;
  FixedExtentScrollController _cupertinoPickerController;
  TextEditingController _phoneNumberController;
  bool _showPhoneError;
  OverlayEntry _overlay;

  String requestId;

  Future<List<CountryCode>> readCountryCodeFromAssets() async {
    return CountryCode.fromJsonList(
      json.decode(await DefaultAssetBundle.of(context).loadString("assets/country_phone_map.json"))
    );
  }

  CountryCode getDefaultCountryCode(List<CountryCode> list) {
    String locale = Localizations.localeOf(context).countryCode.toUpperCase();
    return list.firstWhere((cc) => cc.isoCode == locale, orElse: () => list.firstWhere((cc) => cc.isoCode == 'US'));
  }

  List<Widget> _getCountryCodeForPicker() {
    List<Widget> ret = [];
    _countryCodes.forEach((value) {
      ret.add(Center(child: Text(
        value?.displayName,
        style: AppStyles.paragraphMedium(context),
        )));
    });
    return ret;
  }

  @override
  void initState() {
    super.initState();
    _phoneNumberController = TextEditingController();
    this._showPhoneError = false;
    _cupertinoPickerController = FixedExtentScrollController();
    this.requestId = null;
    readCountryCodeFromAssets().then((values) {
      setState(() {
        _countryCodes = values;
        _selectedCountry = getDefaultCountryCode(values);
        _cupertinoPickerController = FixedExtentScrollController(initialItem: _countryCodes.indexWhere((cc) => cc.isoCode == _selectedCountry.isoCode));
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return TapOutsideUnfocus(
      child: Column(
        children: <Widget>[
          Expanded(
            child: Container(
              decoration: BoxDecoration(
                color: StateContainer.of(context).curTheme.backgroundPrimary,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(12),
                  topRight: Radius.circular(12),
                ),
              ),
              child: Column(
                children: <Widget>[
                  // Sheet header
                  Container(
                    height: 60,
                    width: double.maxFinite,
                    decoration: BoxDecoration(
                      gradient:
                          StateContainer.of(context).curTheme.gradientPrimary,
                      borderRadius: BorderRadius.only(
                        topLeft: Radius.circular(12),
                        topRight: Radius.circular(12),
                      ),
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: <Widget>[
                        // Sized Box
                        SizedBox(
                          height: 50,
                          width: 65,
                        ),
                        // Header
                        Container(
                          width: MediaQuery.of(context).size.width - 130,
                          alignment: Alignment(0, 0),
                          child: AutoSizeText(
                            toUppercase(AppLocalization.of(context).freeAccountSheetHeader, context),
                            style: AppStyles.header(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                            textAlign: TextAlign.center,
                          ),
                        ),
                        // Sized Box
                        SizedBox(
                          height: 50,
                          width: 65,
                        ),
                      ],
                    ),
                  ),
                  Expanded(
                    child: Column(
                      children: <Widget>[
                        //Container for the paragraph
                        Container(
                          alignment: Alignment(-1, 0),
                          margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).enterPhoneNumberParagraph,
                            maxLines: 3,
                            stepGranularity: 0.1,
                            style: AppStyles.paragraph(context),
                          ),
                        ),

                        Expanded(
                          child: KeyboardAvoider(
                            duration: Duration(milliseconds: 0),
                            autoScroll: true,
                            focusPadding: 40,
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: <Widget>[
                                // "Country Code" header
                                Container(
                                  width: MediaQuery.of(context).size.width - 60,
                                  margin: EdgeInsetsDirectional.fromSTEB(
                                      30, 30, 30, 0),
                                  child: AutoSizeText(
                                    AppLocalization.of(context).countryCodeTextFieldHeader,
                                    style: AppStyles.textFieldLabel(context),
                                    maxLines: 1,
                                    stepGranularity: 0.1,
                                    textAlign: TextAlign.start,
                                  ),
                                ),
                                Container(
                                  margin: EdgeInsetsDirectional.only(
                                      start: 30, end: 30),
                                  child: FlatButton(
                                    onPressed: () {
                                      if (_countryCodes == null) {
                                        return;
                                      }
                                      showCountryCodePicker();
                                    },
                                    padding: EdgeInsets.all(0),
                                    child: Column(
                                      children: <Widget>[
                                        // Container for country code
                                        Container(
                                          width: MediaQuery.of(context)
                                                  .size
                                                  .width -
                                              60,
                                          margin:
                                              EdgeInsetsDirectional.fromSTEB(
                                                  0, 14, 0, 0),
                                          child: AutoSizeText.rich(
                                            TextSpan(children: [
                                              TextSpan(
                                                text: _selectedCountry?.displayName,
                                                style: AppStyles.paragraphMedium(
                                                    context),
                                              ),
                                            ]),
                                            maxLines: 1,
                                            stepGranularity: 0.1,
                                            textAlign: TextAlign.start,
                                          ),
                                        ),
                                        // Container for the underline
                                        Container(
                                          width: double.maxFinite,
                                          margin:
                                              EdgeInsetsDirectional.fromSTEB(
                                                  0, 10, 0, 0),
                                          height: 1,
                                          color: StateContainer.of(context)
                                              .curTheme
                                              .primary,
                                        ),
                                      ],
                                    ),
                                  )
                                ),
                                // Container for phone number field
                                Container(
                                  margin: EdgeInsetsDirectional.fromSTEB(
                                      30, 30, 30, 40),
                                  child: AppTextField(
                                    label: AppLocalization.of(context).phoneNumberTextFieldHeader,
                                    style: AppStyles.paragraphMedium(context),
                                    controller: _phoneNumberController,
                                    maxLines: 1,
                                    inputType: TextInputType.phone,
                                    inputFormatters: [
                                      PhoneNumberFormatter(),
                                      WhitelistingTextInputFormatter(RegExp("[0-9-]"))
                                    ],
                                    onChanged: (text) {
                                      if (mounted && this._showPhoneError) {
                                        setState(() {
                                          this._showPhoneError = false;
                                        });
                                      }
                                    },
                                  ),
                                ),
                                // Error Text
                                ErrorContainer(
                                  errorText: this._showPhoneError ? AppLocalization.of(context).invalidPhoneNumberParagraph : "",
                                ),
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                  //"Send Confirmation" and "Cancel" buttons
                  Row(
                    children: <Widget>[
                      AppButton(
                        type: AppButtonType.Primary,
                        text: AppLocalization.of(context).sendConfirmationButton,
                        buttonTop: true,
                        onPressed: () async {
                          if (this.requestId == null) {
                            showOverlay(context);
                            String result = await onSubmitted();
                            _overlay?.remove();
                            if (result != null) {
                              this.requestId = result;
                              AppSheets.showBottomSheet(
                                context: context,
                                widget: ConfirmFreeAccountSheet(
                                  requestId: result,
                                ),
                                noBlur: true
                              );
                            }
                          } else {
                              AppSheets.showBottomSheet(
                                context: context,
                                widget: ConfirmFreeAccountSheet(
                                  requestId: this.requestId
                                ),
                                noBlur: true
                              );                            
                          }
                        },
                      ),
                    ],
                  ),
                  // "Close" button
                  Row(
                    children: <Widget>[
                      AppButton(
                        type: AppButtonType.PrimaryOutline,
                        text: AppLocalization.of(context).cancelButton,
                        onPressed: () {
                          Navigator.of(context).pop();
                        },
                      ),
                    ],
                  ),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }

  void showOverlay(BuildContext context) {
    OverlayState overlayState = Overlay.of(context);
    _overlay = OverlayEntry(
      builder: (context) => BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
            child: Container(
              width: double.maxFinite,
              height: double.maxFinite,
              color: StateContainer.of(context).curTheme.overlay20,
              child: Center(
                child: //Container for the animation
                    Container(
                  margin: EdgeInsetsDirectional.only(
                      top: MediaQuery.of(context).padding.top),
                  //Width/Height ratio for the animation is needed because BoxFit is not working as expected
                  width: double.maxFinite,
                  height: MediaQuery.of(context).size.width,
                  child: Center(
                    child: FlareActor(
                      StateContainer.of(context).curTheme.animationGetAccount,
                      animation: "main",
                      fit: BoxFit.contain,
                    ),
                  ),
                ),
              ),
            ),
          ),
    );
    overlayState.insert(_overlay);
  }

  Future<void> showCountryCodePicker() async {
    CountryCode countrySelection;
    await showCupertinoModalPopup(
      context: context,
      builder: (context) {
        return Container(
          height: MediaQuery.of(context).size.height*0.4,
          child: Material(
            child: CupertinoPicker(
              backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
              useMagnifier: true,
              magnification: 1.5,
              scrollController: _cupertinoPickerController,
              onSelectedItemChanged: (index) {
                countrySelection = _countryCodes[index];
              },
              itemExtent: 30,
              children: _getCountryCodeForPicker()
            ),
          ),
        );
      },
    );
    if (countrySelection != null) {
      setState(() {
        _selectedCountry = countrySelection;
        _cupertinoPickerController = FixedExtentScrollController(initialItem: _countryCodes.indexWhere((cc) => cc.isoCode == _selectedCountry.isoCode));
      });
    }
  }

  // Submit request, return request ID if successful
  Future<String> onSubmitted() async {
    // Validate phone number
    if (_phoneNumberController.text.replaceAll(RegExp(r"[^0-9]"), "").length < 5) {
      if (mounted) {
        setState(() {
          _showPhoneError = true;
        });
      }
      return null;
    }
    // Make free pasa request
    String response = await HttpAPI.getFreePASA(
      _selectedCountry.isoCode,
      _phoneNumberController.text,
      PublicKeyCoder().encodeToBase58(walletState.publicKey)
    );
    // Error occured if null, otherwise move on to verification screen
    if (response == null) {
      UIUtil.showSnackbar(AppLocalization.of(context).somethingWentWrongError, context);
      return null;
    }
    return response;
  }
}

<|start_filename|>lib/ui/widgets/placeholder_account_card.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';

/// A widget for buttons
class PlaceholderAccountCard extends StatefulWidget {
  _PlaceholderAccountCardState createState() => _PlaceholderAccountCardState();
}

class _PlaceholderAccountCardState extends State<PlaceholderAccountCard> {
  @override
  Widget build(BuildContext context) {
    // Account Card
    return Container(
      width: double.maxFinite,
      margin: EdgeInsetsDirectional.fromSTEB(12, 5, 12, 5),
      height: 70,
      decoration: BoxDecoration(
          color: StateContainer.of(context).curTheme.backgroundPrimary,
          borderRadius: BorderRadius.circular(12),
          boxShadow: [StateContainer.of(context).curTheme.shadowAccountCard]),
      child: Stack(
        children: <Widget>[
          // Left gradient background
          Container(
            height: double.maxFinite,
            width: MediaQuery.of(context).size.width * 0.47 - 24,
            decoration: BoxDecoration(
                gradient: StateContainer.of(context).curTheme.gradientPrimary,
                borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(12),
                    bottomLeft: Radius.circular(12))),
          ),
          FlatButton(
            onPressed: () {
              return null;
            },
            padding: EdgeInsets.all(0),
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.all(Radius.circular(12)),
            ),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: <Widget>[
                // Left part of the card with account name and number
                Container(
                  height: double.maxFinite,
                  width: MediaQuery.of(context).size.width * 0.47 - 24,
                  padding: EdgeInsetsDirectional.only(start: 16, end: 16),
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Container(
                        margin: EdgeInsetsDirectional.only(bottom: 5),
                        decoration: BoxDecoration(
                          color: StateContainer.of(context).curTheme.textLight.withOpacity(0.75),
                          borderRadius: BorderRadius.circular(100),
                        ),
                        child: AutoSizeText(
                          "            ",
                          style: AppStyles.accountCardName(context),
                          textAlign: TextAlign.left,
                          stepGranularity: 0.5,
                          maxLines: 1,
                          minFontSize: 8,
                        ),
                      ),
                      Container(
                        decoration: BoxDecoration(
                          color: StateContainer.of(context).curTheme.textLight.withOpacity(0.75),
                          borderRadius: BorderRadius.circular(100),
                        ),
                        child: AutoSizeText(
                          "         ",
                          style: AppStyles.accountCardAddress(context),
                          textAlign: TextAlign.left,
                          stepGranularity: 0.5,
                          maxLines: 1,
                        ),
                      )
                    ],
                  ),
                ),
                // Right part of the card with balance
                Container(
                  height: double.maxFinite,
                  width: MediaQuery.of(context).size.width * 0.53 - 24,
                  padding: EdgeInsetsDirectional.only(end: 16),
                  alignment: Alignment(1, 0),
                  child: Container(
                    decoration: BoxDecoration(
                      color: StateContainer.of(context).curTheme.primary.withOpacity(0.75),
                      borderRadius: BorderRadius.circular(100),
                    ),
                    child: AutoSizeText.rich(
                      TextSpan(
                        children: [
                          TextSpan(
                              text: "              ",
                              style: AppStyles.balanceMedium(context)),
                        ],
                      ),
                      textAlign: TextAlign.end,
                      maxLines: 1,
                      minFontSize: 4,
                      stepGranularity: 1,
                      style: TextStyle(
                        fontSize: 18,
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}


<|start_filename|>lib/ui/account/send/sent_sheet.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/model/available_currency.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/model/db/contact.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:quiver/strings.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class SentSheet extends StatefulWidget {
  final String destination;
  final String amount;
  final String localCurrencyAmount;
  final AvailableCurrency localCurrency;
  final String payload;
  final Currency fee;
  final Contact contact;
  final bool encryptedPayload;
  final AccountName accountName;

  SentSheet(
      {@required this.destination,
      @required this.amount,
      @required this.fee,
      this.localCurrencyAmount,
      this.localCurrency,
      this.contact,
      this.payload = "",
      this.encryptedPayload = false,
      this.accountName});

  _SentSheetState createState() => _SentSheetState();
}

class _SentSheetState extends State<SentSheet> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient: LinearGradient(
                        begin: Alignment.topCenter,
                        end: Alignment.bottomCenter,
                        stops: [
                          0.0,
                          0.7,
                          0.7,
                          1.0
                        ],
                        colors: [
                          StateContainer.of(context).curTheme.success,
                          StateContainer.of(context).curTheme.success,
                          StateContainer.of(context).curTheme.backgroundPrimary,
                          StateContainer.of(context).curTheme.backgroundPrimary,
                        ]),
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Container(
                    margin: EdgeInsetsDirectional.only(top: 8),
                    child: Column(
                      children: <Widget>[
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: <Widget>[
                            // Sized Box
                            SizedBox(
                              height: 50,
                              width: 65,
                            ),
                            // Header
                            Container(
                              width: MediaQuery.of(context).size.width - 130,
                              alignment: Alignment(0, 0),
                              child: AutoSizeText(
                                toUppercase(AppLocalization.of(context)
                                    .sentSheetHeader
                                    ,context),
                                style: AppStyles.header(context),
                                maxLines: 1,
                                stepGranularity: 0.1,
                                textAlign: TextAlign.center,
                              ),
                            ),
                            // Sized Box
                            SizedBox(
                              height: 50,
                              width: 65,
                            ),
                          ],
                        ),
                        // Tick
                        Container(
                          margin: EdgeInsetsDirectional.only(top: 8),
                          height: 110,
                          width: 110,
                          decoration: BoxDecoration(
                            borderRadius: BorderRadius.circular(100),
                            color: StateContainer.of(context).curTheme.success,
                            boxShadow: [
                              StateContainer.of(context)
                                  .curTheme
                                  .shadowTextDarkTwo
                            ],
                          ),
                          child: Icon(
                            AppIcons.tick,
                            size: 40,
                            color: StateContainer.of(context)
                                .curTheme
                                .backgroundPrimary,
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
                Expanded(
                  child: SingleChildScrollView(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: <Widget>[
                        // Paragraph
                        Container(
                          width: double.maxFinite,
                          margin: EdgeInsetsDirectional.fromSTEB(30, 40, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).sentParagraph,
                            style: AppStyles.paragraph(context),
                            stepGranularity: 0.1,
                            maxLines: 3,
                            minFontSize: 8,
                          ),
                        ),
                        // "Address" header
                        Container(
                          width: double.maxFinite,
                          margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).addressTextFieldHeader,
                            style: AppStyles.textFieldLabelSuccess(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                            textAlign: TextAlign.start,
                          ),
                        ),
                        // Container for the account number
                        Container(
                            margin:
                                EdgeInsetsDirectional.fromSTEB(30, 12, 30, 0),
                            padding:
                                EdgeInsetsDirectional.fromSTEB(12, 8, 12, 8),
                            decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(12),
                              border: Border.all(
                                  width: 1,
                                  color: StateContainer.of(context)
                                      .curTheme
                                      .textDark15),
                              color: StateContainer.of(context)
                                  .curTheme
                                  .textDark10,
                            ),
                            child: widget.contact == null && widget.accountName == null
                                ? AutoSizeText(
                                    widget.destination,
                                    maxLines: 1,
                                    stepGranularity: 0.1,
                                    minFontSize: 8,
                                    textAlign: TextAlign.center,
                                    style:
                                        AppStyles.privateKeyTextDark(context),
                                  )
                                : widget.contact != null ? AutoSizeText.rich(
                                    TextSpan(children: [
                                      TextSpan(
                                        text: " ",
                                        style: AppStyles.iconFontSuccessSmall(
                                            context),
                                      ),
                                      TextSpan(
                                          text:
                                              widget.contact.name,
                                          style: AppStyles.contactsItemName(
                                              context)),
                                      TextSpan(
                                          text: " (" +
                                              widget.contact.account
                                                  .toString() +
                                              ")",
                                          style:
                                              AppStyles.privateKeyTextDarkFaded(
                                                  context)),
                                    ]),
                                    style: TextStyle(
                                      fontSize: 14,
                                    ),
                                    minFontSize: 8,
                                    stepGranularity: 0.1)
                                  : 
                                  AutoSizeText.rich(
                                    TextSpan(children: [
                                      TextSpan(
                                          text:
                                              widget.accountName.toString(),
                                          style: AppStyles.contactsItemName(
                                              context)),
                                      TextSpan(
                                          text: " (" +
                                              widget.destination
                                                  .toString() +
                                              ")",
                                          style:
                                              AppStyles.privateKeyTextDarkFaded(
                                                  context)),
                                    ]),
                                    style: TextStyle(
                                      fontSize: 14,
                                    ),
                                    minFontSize: 8,
                                    stepGranularity: 0.1
                                  )
                        ),
                        // Amount and Fee
                        Container(
                          margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
                          child: Row(
                            children: <Widget>[
                              // Amount
                              Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: <Widget>[
                                  // "Amount" header
                                  Container(
                                    constraints: BoxConstraints(
                                        maxWidth:
                                            MediaQuery.of(context).size.width -
                                                76 / 2),
                                    margin: EdgeInsetsDirectional.fromSTEB(
                                        0, 30, 0, 0),
                                    child: AutoSizeText(
                                      AppLocalization.of(context)
                                          .amountTextFieldHeader,
                                      style: AppStyles.textFieldLabelSuccess(
                                          context),
                                      maxLines: 1,
                                      stepGranularity: 0.1,
                                      textAlign: TextAlign.start,
                                    ),
                                  ),
                                  // Container for the Amount
                                  Container(
                                    constraints: BoxConstraints(
                                        maxWidth:
                                            MediaQuery.of(context).size.width -
                                                76 / 2),
                                    margin: EdgeInsetsDirectional.fromSTEB(
                                        0, 12, 0, 0),
                                    padding: EdgeInsetsDirectional.fromSTEB(
                                        12, 8, 12, 8),
                                    decoration: BoxDecoration(
                                      borderRadius: BorderRadius.circular(12),
                                      border: Border.all(
                                          width: 1,
                                          color: StateContainer.of(context)
                                              .curTheme
                                              .success15),
                                      color: StateContainer.of(context)
                                          .curTheme
                                          .success10,
                                    ),
                                    child: AutoSizeText.rich(
                                      TextSpan(
                                        children: widget.localCurrencyAmount == null ? [
                                          TextSpan(
                                            text: "",
                                            style: AppStyles
                                                .iconFontSuccessBalanceSmallPascal(
                                                    context),
                                          ),
                                          TextSpan(
                                              text: " ",
                                              style: TextStyle(fontSize: 8)),
                                          TextSpan(
                                              text: widget.amount,
                                              style:
                                                  AppStyles.balanceSmallSuccess(
                                                      context)),
                                        ] :
                                        [
                                          TextSpan(
                                            text: "",
                                            style: AppStyles
                                                .iconFontSuccessBalanceSmallPascal(
                                                    context),
                                          ),
                                          TextSpan(
                                              text: " ",
                                              style: TextStyle(fontSize: 8)),
                                          TextSpan(
                                              text: widget.amount,
                                              style: AppStyles.balanceSmallSuccess(
                                                  context)),
                                          TextSpan(
                                              text: " (",
                                              style: AppStyles.balanceSmallSuccess(
                                                  context)),
                                          TextSpan(
                                            text: widget.localCurrency.getCurrencySymbol(),
                                            style: AppStyles.balanceSmallSuccess(context)
                                          ),
                                          TextSpan(
                                              text: widget.localCurrencyAmount,
                                              style: AppStyles.balanceSmallSuccess(
                                                  context)),
                                          TextSpan(
                                              text: ")",
                                              style: AppStyles.balanceSmallSuccess(
                                                  context)),
                                        ],
                                      ),
                                      textAlign: TextAlign.center,
                                      maxLines: 1,
                                      minFontSize: 8,
                                      stepGranularity: 1,
                                      style: TextStyle(
                                        fontSize: 14,
                                      ),
                                    ),
                                  ),
                                ],
                              ),
                              widget.fee != Currency("0")
                                  ? Column(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      children: <Widget>[
                                        // "Fee" header
                                        Container(
                                          constraints: BoxConstraints(
                                              maxWidth: MediaQuery.of(context)
                                                      .size
                                                      .width -
                                                  76 / 2),
                                          margin:
                                              EdgeInsetsDirectional.fromSTEB(
                                                  16, 30, 0, 0),
                                          child: AutoSizeText(
                                            AppLocalization.of(context)
                                                .feeTextFieldHeader,
                                            style:
                                                AppStyles.textFieldLabelSuccess(
                                                    context),
                                            maxLines: 1,
                                            stepGranularity: 0.1,
                                            textAlign: TextAlign.start,
                                          ),
                                        ),
                                        // Container for the fee
                                        Container(
                                          constraints: BoxConstraints(
                                              maxWidth: MediaQuery.of(context)
                                                      .size
                                                      .width -
                                                  76 / 2),
                                          margin:
                                              EdgeInsetsDirectional.fromSTEB(
                                                  16, 12, 0, 0),
                                          padding:
                                              EdgeInsetsDirectional.fromSTEB(
                                                  12, 8, 12, 8),
                                          decoration: BoxDecoration(
                                            borderRadius:
                                                BorderRadius.circular(12),
                                            border: Border.all(
                                                width: 1,
                                                color:
                                                    StateContainer.of(context)
                                                        .curTheme
                                                        .success15),
                                            color: StateContainer.of(context)
                                                .curTheme
                                                .success10,
                                          ),
                                          child: AutoSizeText.rich(
                                            TextSpan(
                                              children: [
                                                TextSpan(
                                                  text: "",
                                                  style: AppStyles
                                                      .iconFontSuccessBalanceSmallPascal(
                                                          context),
                                                ),
                                                TextSpan(
                                                    text: " ",
                                                    style:
                                                        TextStyle(fontSize: 8)),
                                                TextSpan(
                                                    text: widget.fee
                                                        .toStringOpt(),
                                                    style: AppStyles
                                                        .balanceSmallSuccess(
                                                            context)),
                                              ],
                                            ),
                                            textAlign: TextAlign.center,
                                            maxLines: 1,
                                            minFontSize: 8,
                                            stepGranularity: 1,
                                            style: TextStyle(
                                              fontSize: 14,
                                            ),
                                          ),
                                        ),
                                      ],
                                    )
                                  : SizedBox(),
                            ],
                          ),
                        ),
                        // "Payload" header
                        isNotEmpty(widget.payload)
                            ? Container(
                                width: double.maxFinite,
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 30, 30, 0),
                                child: AutoSizeText(
                                  AppLocalization.of(context)
                                      .payloadTextFieldHeader,
                                  style:
                                      AppStyles.textFieldLabelSuccess(context),
                                  maxLines: 1,
                                  stepGranularity: 0.1,
                                  textAlign: TextAlign.start,
                                ),
                              )
                            : SizedBox(),
                        // Container for the payload text
                        isNotEmpty(widget.payload)
                            ? Container(
                                margin: EdgeInsetsDirectional.fromSTEB(
                                    30, 12, 30, 0),
                                padding: EdgeInsetsDirectional.fromSTEB(
                                    12, 8, 12, 8),
                                decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(12),
                                  border: Border.all(
                                      width: 1,
                                      color: StateContainer.of(context)
                                          .curTheme
                                          .textDark15),
                                  color: StateContainer.of(context)
                                      .curTheme
                                      .textDark10,
                                ),
                                child: Row(
                                    mainAxisSize: MainAxisSize.min,
                                    children: <Widget>[
                                      Container(
                                        constraints: BoxConstraints(
                                            maxWidth: MediaQuery.of(context)
                                                    .size
                                                    .width -
                                                (widget.encryptedPayload
                                                    ? 101
                                                    : 86)),
                                        child: AutoSizeText(
                                          widget.payload,
                                          maxLines: 3,
                                          stepGranularity: 0.1,
                                          minFontSize: 8,
                                          textAlign: TextAlign.start,
                                          style: AppStyles.paragraph(context),
                                        ),
                                      ),
                                      widget.encryptedPayload
                                          ? Container(
                                              alignment: Alignment.center,
                                              margin:
                                                  EdgeInsetsDirectional.only(
                                                      start: 3.0),
                                              child: Icon(FontAwesomeIcons.lock,
                                                  size: 12,
                                                  color:
                                                      StateContainer.of(context)
                                                          .curTheme
                                                          .textDark))
                                          : SizedBox()
                                    ]))
                            : SizedBox(),
                        // Bottom Margin
                        SizedBox(height: 24),
                      ],
                    ),
                  ),
                ),
                // "CANCEL" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.SuccessOutline,
                      text: AppLocalization.of(context).closeButton,
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }
}


<|start_filename|>test/signing/operations/changekeysigned_operation_test.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/common.dart';
import 'package:pascaldart/crypto.dart';
import 'package:pascaldart/signing.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('signing.operations.ChangeKeySignedOperation', () {
    Map<String, dynamic> fixture;

    setUp(() {
      fixture = {
        'sender': 1440500,
        'target': 1440503,
        'oldPublicKey':
            '<KEY>',
        'newPublicKey':
            '<KEY>',
        'fee': 0.0002,
        'payload': 'techworker',
        'n_operation': 4003,
        's': 'AEB41A5FB2D7A1B89C17897E87959AE63B9864236397FBDCFF118E964B1211C8',
        'r': '5CAD340D46F1A926DCD3FA00962A0EFC856733E46285BF945B1F19A90DE2BEF8',
        'raw':
            '0100000007000000F4FA1500F7FA1500A30F000002000000000000000A0074656368776F726B65720000000000004600CA0220003078FA6B1419BD6F4D4F6A779358EBFA6BC12F3CE32E47A8D9F7CD5FA8956FF0200053A101778813DD24B90A5198BAE5EB9F8AA5EDFD30E4C130A69FDD62CAE774F920005CAD340D46F1A926DCD3FA00962A0EFC856733E46285BF945B1F19A90DE2BEF82000AEB41A5FB2D7A1B89C17897E87959AE63B9864236397FBDCFF118E964B1211C8'
      };
    });

    test('can be decode a signed operation', () {
      ChangeKeySignedOperation decoded =
          RawOperationCoder.decodeFromBytes(PDUtil.hexToBytes(fixture['raw']));

      expect(PDUtil.byteToHex(PDUtil.encodeBigInt(decoded.signature.r)),
          fixture['r']);
      expect(PDUtil.byteToHex(PDUtil.encodeBigInt(decoded.signature.s)),
          fixture['s']);
      expect(decoded.signer.account, fixture['sender']);
      expect(decoded.target.account, fixture['target']);
      expect(decoded.nOperation, fixture['n_operation']);
      expect(decoded.fee.toStringOpt(), fixture['fee'].toString());
      expect(PDUtil.bytesToUtf8String(decoded.payload), fixture['payload']);
      expect(PublicKeyCoder().encodeToBase58(decoded.newPublicKey),
          fixture['newPublicKey']);
    });

    test('can be decode signed operation and encode it again', () {
      ChangeKeySignedOperation decoded =
          RawOperationCoder.decodeFromBytes(PDUtil.hexToBytes(fixture['raw']));

      expect(PDUtil.byteToHex(RawOperationCoder.encodeToBytes(decoded)),
          fixture['raw']);
    });

    test('can be build by hand', () {
      ChangeKeySignedOperation op = ChangeKeySignedOperation(
          signer: AccountNumber.fromInt(fixture['sender']),
          target: AccountNumber.fromInt(fixture['target']),
          newPublicKey:
              PublicKeyCoder().decodeFromBase58(fixture['newPublicKey']))
        ..withNOperation(fixture['n_operation'])
        ..withPayload(PDUtil.stringToBytesUtf8(fixture['payload']))
        ..withFee(Currency(fixture['fee'].toString()))
        ..withSignature(Signature(
            r: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['r'])),
            s: PDUtil.decodeBigInt(PDUtil.hexToBytes(fixture['s']))));

      Uint8List encoded = RawOperationCoder.encodeToBytes(op);

      expect(PDUtil.byteToHex(encoded), fixture['raw']);
    });
    test('can be built by hand and signed', () {
      PrivateKey pk = PrivateKeyCoder().decodeFromBytes(PDUtil.hexToBytes(
          '<KEY>'));
      ChangeKeySignedOperation op = ChangeKeySignedOperation(
          signer: AccountNumber.fromInt(fixture['sender']),
          target: AccountNumber.fromInt(fixture['target']),
          newPublicKey:
              PublicKeyCoder().decodeFromBase58(fixture['newPublicKey']))
        ..withNOperation(fixture['n_operation'])
        ..withPayload(PDUtil.stringToBytesUtf8(fixture['payload']))
        ..withFee(Currency(fixture['fee'].toString()))
        ..sign(pk);

      expect(op.signature.r.toString().length > 30, true);
      expect(op.signature.s.toString().length > 30, true);
    });
  });
}


<|start_filename|>lib/bus/payload_changed_event.dart<|end_filename|>
import 'package:event_taxi/event_taxi.dart';

class PayloadChangedEvent implements Event {
  final String payload;

  PayloadChangedEvent({this.payload});
}

<|start_filename|>lib/bus/subscribe_event.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/response/subscribe_response.dart';
import 'package:event_taxi/event_taxi.dart';

class SubscribeEvent implements Event {
  final SubscribeResponse response;

  SubscribeEvent({this.response});
}

<|start_filename|>lib/network/model/response/accounts_response_borrowed.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'accounts_response_borrowed.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

AccountsResponseBorrowed _$AccountsResponseBorrowedFromJson(
    Map<String, dynamic> json) {
  return AccountsResponseBorrowed(
    borrowedAccount: json['borrowed_account'] == null
        ? null
        : BorrowResponse.fromJson(
            json['borrowed_account'] as Map<String, dynamic>),
    borrowEligible: json['borrow_eligible'] as bool,
  )..accounts = (json['result'] as List)
      ?.map((e) =>
          e == null ? null : PascalAccount.fromJson(e as Map<String, dynamic>))
      ?.toList();
}

Map<String, dynamic> _$AccountsResponseBorrowedToJson(
        AccountsResponseBorrowed instance) =>
    <String, dynamic>{
      'result': instance.accounts,
      'borrowed_account': instance.borrowedAccount,
      'borrow_eligible': instance.borrowEligible,
    };


<|start_filename|>lib/network/model/request/subscribe_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';

part 'subscribe_request.g.dart';

@JsonSerializable()
class SubscribeRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'account', includeIfNull: false)
  int account;

  @JsonKey(name:'currency', includeIfNull: false)
  String currency;

  @JsonKey(name:'uuid', includeIfNull: false)
  String uuid;

  @JsonKey(name:'b58_pubkey', includeIfNull: false)
  String b58pubkey;

  @JsonKey(name:'fcm_token', includeIfNull: false)
  String fcmToken;

  @JsonKey(name:'notification_enabled', includeIfNull: false)
  bool notificationEnabled;

  SubscribeRequest({this.action = "account_subscribe", this.account, this.currency, this.uuid, this.b58pubkey, this.fcmToken, this.notificationEnabled}) : super();

  factory SubscribeRequest.fromJson(Map<String, dynamic> json) => _$SubscribeRequestFromJson(json);
  Map<String, dynamic> toJson() => _$SubscribeRequestToJson(this);
}

<|start_filename|>lib/ui/widgets/webview.dart<|end_filename|>
import 'dart:io';

import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

class AppWebView {
  static void showWebView(BuildContext context, String url) {
    UIUtil.cancelLockEvent();
    Navigator.push(
        context,
        MaterialPageRoute<void>(
            builder: (BuildContext context) => WebviewScaffold(
                resizeToAvoidBottomInset: Platform.isAndroid,
                url: url,
                appBar: AppBar(
                    backgroundColor:
                        StateContainer.of(context).curTheme.primary,
                    brightness: StateContainer.of(context).curTheme.brightness,
                    iconTheme: IconThemeData(
                        color:
                            StateContainer.of(context).curTheme.textLight)))));
  }
}


<|start_filename|>lib/bus/daemon_changed_event.dart<|end_filename|>
import 'package:event_taxi/event_taxi.dart';

class DaemonChangedEvent implements Event {
  final String newDaemon;

  DaemonChangedEvent({this.newDaemon});
}

<|start_filename|>lib/network/model/request/fcm_update_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';

part 'fcm_update_request.g.dart';

@JsonSerializable()
class FcmUpdateRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'account', includeIfNull: false)
  int account;

  @JsonKey(name:'b58_pubkey', includeIfNull: false)
  String b58pubkey;

  @JsonKey(name:'fcm_token', includeIfNull: false)
  String fcmToken;

  @JsonKey(name:'enabled')
  bool enabled;

  FcmUpdateRequest({@required this.account, @required this.fcmToken, @required this.enabled, @required this.b58pubkey}) : super() {
    this.action = 'fcm_update';
  }

  factory FcmUpdateRequest.fromJson(Map<String, dynamic> json) => _$FcmUpdateRequestFromJson(json);
  Map<String, dynamic> toJson() => _$FcmUpdateRequestToJson(this);
}

<|start_filename|>lib/network/model/response/subscribe_response.dart<|end_filename|>
import 'package:json_annotation/json_annotation.dart';

part 'subscribe_response.g.dart';

double _toDouble(v) {
  return double.tryParse(v.toString());
}

/// For running in an isolate, needs to be top-level function
SubscribeResponse subscribeResponseFromJson(Map<dynamic, dynamic> json) {
  return SubscribeResponse.fromJson(json);
} 

@JsonSerializable()
class SubscribeResponse {
  // Server provides a uuid for each connection
  @JsonKey(name:'uuid')
  String uuid;

  @JsonKey(name:'price', fromJson:_toDouble)
  double price;

  @JsonKey(name:'btc', fromJson:_toDouble)
  double btcPrice;

  @JsonKey(name:'borrow_eligible', defaultValue: false)
  bool borrowEligible;

  SubscribeResponse();

  factory SubscribeResponse.fromJson(Map<String, dynamic> json) => _$SubscribeResponseFromJson(json);
  Map<String, dynamic> toJson() => _$SubscribeResponseToJson(this);
}

<|start_filename|>lib/ui/intro/intro_new_private_key.dart<|end_filename|>
import 'dart:async';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/util/user_data_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class IntroNewPrivateKeyPage extends StatefulWidget {
  @override
  _IntroNewPrivateKeyPageState createState() => _IntroNewPrivateKeyPageState();
}

class _IntroNewPrivateKeyPageState extends State<IntroNewPrivateKeyPage> {
  bool _keyCopied;
  Timer _keyCopiedTimer;
  var _scaffoldKey = GlobalKey<ScaffoldState>();

  @override
  void initState() {
    super.initState();
    _keyCopied = false;
  }

  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      key: _scaffoldKey,
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      body: LayoutBuilder(
        builder: (context, constraints) => Column(
          children: <Widget>[
            //A widget that holds welcome animation + paragraph
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  // Container for the header
                  Container(
                    padding: EdgeInsetsDirectional.only(
                      top: (MediaQuery.of(context).padding.top) +
                          (24 - (MediaQuery.of(context).padding.top) / 2),
                    ),
                    decoration: BoxDecoration(
                      gradient:
                          StateContainer.of(context).curTheme.gradientPrimary,
                    ),
                    // Row for back button and the header
                    child: Row(
                      children: <Widget>[
                        // The header
                        Container(
                          width: MediaQuery.of(context).size.width - 60,
                          margin:
                              EdgeInsetsDirectional.fromSTEB(30, 24, 30, 24),
                          child: AutoSizeText(
                            AppLocalization.of(context).newPrivateKeyHeader,
                            style: AppStyles.header(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                          ),
                        ),
                      ],
                    ),
                  ),
                  //Container for the paragraph
                  Container(
                    alignment: Alignment(-1, 0),
                    margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                    child: AutoSizeText(
                      AppLocalization.of(context).newPrivateKeyParagraph,
                      maxLines: 5,
                      stepGranularity: 0.1,
                      style: AppStyles.paragraph(context),
                    ),
                  ),
                  // Container for the private key
                  Container(
                    margin: EdgeInsetsDirectional.fromSTEB(30, 24, 30, 0),
                    padding: EdgeInsetsDirectional.fromSTEB(32, 16, 32, 16),
                    width: MediaQuery.of(context).size.width - 60,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(12),
                      border: Border.all(
                          width: 1,
                          color: _keyCopied
                              ? StateContainer.of(context).curTheme.success15
                              : StateContainer.of(context).curTheme.primary15),
                      color: _keyCopied
                          ? StateContainer.of(context).curTheme.success10
                          : StateContainer.of(context).curTheme.primary10,
                    ),
                    child: FutureBuilder(
                        future: sl.get<Vault>().getPrivateKey(),
                        builder:
                            (BuildContext context, AsyncSnapshot snapshot) {
                          if (snapshot.hasData && snapshot.data != null) {
                            return AutoSizeText(
                              snapshot.data,
                              textAlign: TextAlign.center,
                              maxLines: 3,
                              stepGranularity: 0.5,
                              style: _keyCopied
                                  ? AppStyles.privateKeySuccess(context)
                                  : AppStyles.privateKeyPrimary(context),
                            );
                          } else {
                            return SizedBox();
                          }
                        }),
                  ),
                  // Container for the "Copy to Clipboard" button
                  Row(
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: <Widget>[
                      Container(
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(100.0),
                          color: _keyCopied
                              ? StateContainer.of(context).curTheme.success
                              : StateContainer.of(context)
                                  .curTheme
                                  .backgroundPrimary,
                          boxShadow: [
                            StateContainer.of(context).curTheme.shadowTextDark,
                          ],
                        ),
                        margin: EdgeInsetsDirectional.fromSTEB(30, 12, 30, 0),
                        height: 40,
                        child: FlatButton(
                          shape: RoundedRectangleBorder(
                              borderRadius: BorderRadius.circular(100.0)),
                          child: AutoSizeText(
                            _keyCopied
                                ? AppLocalization.of(context).copiedButton
                                : AppLocalization.of(context).copyButton,
                            textAlign: TextAlign.center,
                            maxLines: 1,
                            stepGranularity: 0.1,
                            style: _keyCopied
                                ? AppStyles.buttonMiniSuccess(context)
                                : AppStyles.buttonMiniBg(context),
                          ),
                          splashColor: StateContainer.of(context)
                              .curTheme
                              .backgroundPrimary60,
                          highlightColor: StateContainer.of(context)
                              .curTheme
                              .backgroundPrimary30,
                          onPressed: () {
                            sl.get<Vault>().getPrivateKey().then((key) {
                              UserDataUtil.setSecureClipboardItem(key);
                            });
                            setState(() {
                              _keyCopied = true;
                            });
                            if (_keyCopiedTimer != null) {
                              _keyCopiedTimer.cancel();
                            }
                            _keyCopiedTimer =
                                Timer(const Duration(milliseconds: 1500), () {
                              if (mounted) {
                                setState(() {
                                  _keyCopied = false;
                                });
                              }
                            });
                          },
                        ),
                      ),
                    ],
                  ),
                ],
              ),
            ),

            //"I've Backed It Up" and "Go Back" buttons
            Row(
              children: <Widget>[
                AppButton(
                  type: AppButtonType.Primary,
                  text: AppLocalization.of(context).iHaveBackedItUpButton,
                  buttonTop: true,
                  onPressed: () {
                    Navigator.of(context).pushNamed('/intro_backup_confirm');
                  },
                ),
              ],
            ),
            // "Go Back" button
            Row(
              children: <Widget>[
                AppButton(
                  type: AppButtonType.PrimaryOutline,
                  text: AppLocalization.of(context).goBackButton,
                  onPressed: () {
                    Navigator.of(context).pop();
                  },
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}


<|start_filename|>lib/ui/widgets/buttons.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:flutter/material.dart';

enum AppButtonType {
  Primary,
  PrimaryLeft,
  PrimaryRight,
  PrimaryOutline,
  Success,
  SuccessOutline,
  Danger,
  DangerOutline,
}

/// A widget for buttons
class AppButton extends StatefulWidget {
  final AppButtonType type;
  final String text;
  final Function onPressed;
  final bool disabled;
  final bool buttonTop;
  final bool buttonMiddle;
  final bool placeholder;

  AppButton(
      {this.type,
      this.text,
      this.onPressed,
      this.disabled = false,
      this.buttonTop = false,
      this.placeholder = false,
      this.buttonMiddle = false});

  _AppButtonState createState() => _AppButtonState();
}

class _AppButtonState extends State<AppButton> {
  @override
  Widget build(BuildContext context) {
    return Expanded(
        child: Opacity(
      opacity: widget.disabled ? 0.4 : 1.0,
      child: Container(
        margin: widget.buttonTop
            ? EdgeInsetsDirectional.fromSTEB(20, 20, 20, 0)
            : widget.buttonMiddle
                ? EdgeInsetsDirectional.fromSTEB(20, 16, 20, 0)
                : EdgeInsetsDirectional.fromSTEB(
                    widget.type == AppButtonType.PrimaryRight ? 10 : 20,
                    16,
                    widget.type == AppButtonType.PrimaryLeft ? 10 : 20,
                    (MediaQuery.of(context).padding.bottom) +
                        (24 - (MediaQuery.of(context).padding.bottom) / 2),
                  ),
        height: 50,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(12.0),
          gradient: (widget.type == AppButtonType.Primary ||
                  widget.type == AppButtonType.PrimaryOutline ||
                  widget.type == AppButtonType.PrimaryLeft ||
                  widget.type == AppButtonType.PrimaryRight)
              ? StateContainer.of(context).curTheme.gradientPrimary
              : (widget.type == AppButtonType.Danger ||
                      widget.type == AppButtonType.DangerOutline ||
                      widget.type == AppButtonType.Success ||
                      widget.type == AppButtonType.SuccessOutline)
                  ? null
                  : StateContainer.of(context)
                      .curTheme
                      .gradientPrimary, // Success color placeholder
          color: (widget.type == AppButtonType.Danger ||
                  widget.type == AppButtonType.DangerOutline)
              ? StateContainer.of(context).curTheme.danger
              : widget.type == AppButtonType.Success ||
                      widget.type == AppButtonType.SuccessOutline
                  ? StateContainer.of(context).curTheme.success
                  : null,
          boxShadow: [
            widget.type == AppButtonType.Primary ||
                    widget.type == AppButtonType.PrimaryLeft ||
                    widget.type == AppButtonType.PrimaryRight
                ? StateContainer.of(context).curTheme.shadowPrimaryOne
                : widget.type == AppButtonType.PrimaryOutline
                    ? StateContainer.of(context).curTheme.shadowPrimaryTwo
                    : widget.type == AppButtonType.Success
                        ? StateContainer.of(context).curTheme.shadowSuccessOne
                        : widget.type == AppButtonType.SuccessOutline
                            ? StateContainer.of(context)
                                .curTheme
                                .shadowSuccessTwo
                            : widget.type == AppButtonType.Danger
                                ? StateContainer.of(context)
                                    .curTheme
                                    .shadowDangerOne
                                : StateContainer.of(context)
                                    .curTheme
                                    .shadowDangerTwo,
          ],
        ),
        child: widget.type == AppButtonType.Primary ||
                widget.type == AppButtonType.PrimaryLeft ||
                widget.type == AppButtonType.PrimaryRight ||
                widget.type == AppButtonType.Success ||
                widget.type == AppButtonType.Danger
            // Primary Button
            ? FlatButton(
                shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(12.0)),
                child: !widget.placeholder
                    ? AutoSizeText(
                        widget.text,
                        textAlign: TextAlign.center,
                        maxLines: widget.type == AppButtonType.Danger ? 2 : 1,
                        stepGranularity: 0.1,
                        style: widget.type == AppButtonType.Danger
                            ? AppStyles.buttonDanger(context)
                            : AppStyles.buttonPrimary(context),
                      )
                    // Placeholder button rectangle
                    : Container(
                        decoration: BoxDecoration(
                          color: StateContainer.of(context).curTheme.textLight.withOpacity(0.75),
                          borderRadius: BorderRadius.circular(100),
                        ),
                        child: AutoSizeText(
                          widget.text,
                          textAlign: TextAlign.center,
                          maxLines: widget.type == AppButtonType.Danger ? 2 : 1,
                          stepGranularity: 0.1,
                          style: widget.type == AppButtonType.Danger
                              ? AppStyles.buttonDanger(context)
                              : AppStyles.buttonPrimary(context),
                        ),
                      ),
                splashColor:
                    StateContainer.of(context).curTheme.backgroundPrimary30,
                highlightColor:
                    StateContainer.of(context).curTheme.backgroundPrimary15,
                onPressed: () {
                  if (widget.onPressed != null && !widget.disabled) {
                    widget.onPressed();
                  }
                  return;
                },
              )
            // Primary Outlined Button
            : Stack(
                children: <Widget>[
                  Container(
                    margin: EdgeInsets.all(2),
                    height: 46,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(10),
                      color:
                          StateContainer.of(context).curTheme.backgroundPrimary,
                    ),
                  ),
                  Container(
                    height: 50,
                    width: double.maxFinite,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(12),
                      color: Colors.transparent,
                    ),
                    child: FlatButton(
                      child: AutoSizeText(
                        widget.text,
                        textAlign: TextAlign.center,
                        maxLines: 1,
                        stepGranularity: 0.1,
                        style: widget.type == AppButtonType.DangerOutline
                            ? AppStyles.buttonDangerOutline(context)
                            : widget.type == AppButtonType.SuccessOutline
                                ? AppStyles.buttonSuccessOutline(context)
                                : AppStyles.buttonPrimaryOutline(context),
                      ),
                      color: Colors.transparent,
                      splashColor: widget.type == AppButtonType.SuccessOutline
                          ? StateContainer.of(context).curTheme.success30
                          : widget.type == AppButtonType.DangerOutline
                              ? StateContainer.of(context).curTheme.danger30
                              : StateContainer.of(context).curTheme.primary30,
                      highlightColor: widget.type ==
                              AppButtonType.SuccessOutline
                          ? StateContainer.of(context).curTheme.success15
                          : widget.type == AppButtonType.DangerOutline
                              ? StateContainer.of(context).curTheme.danger15
                              : StateContainer.of(context).curTheme.primary15,
                      shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.circular(12.0)),
                      onPressed: () {
                        if (widget.onPressed != null && !widget.disabled) {
                          widget.onPressed();
                        }
                        return;
                      },
                    ),
                  ),
                ],
              ),
      ),
    ));
  }
}


<|start_filename|>lib/network/model/request/fcm_delete_account_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';

part 'fcm_delete_account_request.g.dart';

@JsonSerializable()
class FcmDeleteAccountRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'account', includeIfNull: false)
  int account;

  @JsonKey(name:'fcm_token', includeIfNull: false)
  String fcmToken;

  FcmDeleteAccountRequest({@required int account, @required String fcmToken}) : super() {
    this.action = 'fcm_update';
    this.account = account;
    this.fcmToken = fcmToken;
  }

  factory FcmDeleteAccountRequest.fromJson(Map<String, dynamic> json) => _$FcmDeleteAccountRequestFromJson(json);
  Map<String, dynamic> toJson() => _$FcmDeleteAccountRequestToJson(this);
}

<|start_filename|>lib/main.dart<|end_filename|>
import 'dart:io';

import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/model/available_languages.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/account/account.dart';
import 'package:blaise_wallet_flutter/ui/intro/intro_security_first.dart';
import 'package:blaise_wallet_flutter/ui/lockscreen/lock_screen.dart';
import 'package:blaise_wallet_flutter/ui/overview/overview.dart';
import 'package:blaise_wallet_flutter/ui/intro/intro_backup_confirm.dart';
import 'package:blaise_wallet_flutter/ui/intro/intro_decrypt_and_import_private_key.dart';
import 'package:blaise_wallet_flutter/ui/intro/intro_import_private_key.dart';
import 'package:blaise_wallet_flutter/ui/intro/intro_new_private_key.dart';
import 'package:blaise_wallet_flutter/ui/settings/contacts/contacts.dart';
import 'package:blaise_wallet_flutter/ui/settings/security.dart';
import 'package:blaise_wallet_flutter/ui/util/routes.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/intro/intro_welcome.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:logger/logger.dart';
import 'package:oktoast/oktoast.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // Register services
  setupServiceLocator();
  // Setup logger, only show warning and higher in release mode.
  if (kReleaseMode) {
    Logger.level = Level.warning;
  } else {
    Logger.level = Level.debug;
  }
  // Run app
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
      .then((_) {
    runApp(StateContainer(child: App()));
  });
}

class App extends StatefulWidget {
  @override
  _AppState createState() => _AppState();
}

class _AppState extends State<App> {
  @override
  void initState() {
    super.initState();
  }

  // This widget is the root of the application.
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(
        StateContainer.of(context).curTheme.statusBar);
    return OKToast(
      textStyle: AppStyles.snackbar(context),
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        title: 'Blaise',
        theme: ThemeData(
          dialogBackgroundColor:
              StateContainer.of(context).curTheme.backgroundPrimary,
          primaryColor: StateContainer.of(context).curTheme.primary,
          accentColor: StateContainer.of(context).curTheme.primary,
          backgroundColor:
              StateContainer.of(context).curTheme.backgroundPrimary,
          fontFamily: 'Metropolis',
          brightness: StateContainer.of(context).curTheme.brightness,
          splashColor: StateContainer.of(context).curTheme.primary30,
          highlightColor: StateContainer.of(context).curTheme.primary15,
        ),
        localizationsDelegates: [
          AppLocalizationsDelegate(StateContainer.of(context).curLanguage),
          GlobalMaterialLocalizations.delegate,
          GlobalCupertinoLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate
        ],
        initialRoute: '/',
        onGenerateRoute: (RouteSettings settings) {
          switch (settings.name) {
            case '/':
              return NoTransitionRoute(
                builder: (context) => Splash(),
                settings: settings,
              );
            case '/lock_screen':
              if (settings.arguments != null &&
                  settings.arguments is TransitionOption &&
                  settings.arguments == TransitionOption.NONE) {
                return NoTransitionRoute(
                  builder: (context) => LockScreenPage(),
                  settings: settings,
                );
              }
              return MaterialPageRoute(
                builder: (context) => LockScreenPage(),
                settings: settings,
              );
            case '/intro_welcome':
              return NoTransitionRoute(
                builder: (context) => IntroWelcomePage(),
                settings: settings,
              );
            case '/intro_security_first':
              return MaterialPageRoute(
                builder: (context) => IntroSecurityFirstPage(),
                settings: settings,
              );
            case '/intro_new_private_key':
              return MaterialPageRoute(
                builder: (context) => IntroNewPrivateKeyPage(),
                settings: settings,
              );
            case '/intro_backup_confirm':
              return MaterialPageRoute(
                builder: (context) => IntroBackupConfirmPage(),
                settings: settings,
              );
            case '/intro_import_private_key':
              return MaterialPageRoute(
                builder: (context) => IntroImportPrivateKeyPage(),
                settings: settings,
              );
            case '/intro_decrypt_and_import_private_key':
              return MaterialPageRoute(
                builder: (context) => IntroDecryptAndImportPrivateKeyPage(
                    encryptedKey: settings.arguments),
                settings: settings,
              );
            case '/overview':
              if (settings.arguments != null &&
                  settings.arguments is TransitionOption &&
                  settings.arguments == TransitionOption.NONE) {
                return NoTransitionRoute(
                  builder: (context) => OverviewPage(),
                  settings: settings,
                );
              }
              return MaterialPageRoute(
                builder: (context) => OverviewPage(),
                settings: settings,
              );
            case '/account':
              return MaterialPageRoute(
                builder: (context) => AccountPage(account: settings.arguments),
                settings: settings,
              );
            case '/security':
              return MaterialPageRoute(
                builder: (context) => SecurityPage(),
                settings: settings,
              );
            case '/contacts':
              return MaterialPageRoute(
                builder: (context) => ContactsPage(account: settings.arguments),
                settings: settings,
              );
            default:
              return null;
          }
        },
        locale: StateContainer.of(context).curLanguage == null || StateContainer.of(context).curLanguage.language == AvailableLanguage.DEFAULT ? null : StateContainer.of(context).curLanguage.getLocale(),
        supportedLocales: [
          // Languages
          const Locale('en', 'US'), // English
          const Locale('de', 'DE'), // German
          const Locale('es'), // Spanish
          const Locale('tr'), // Turkish
          const Locale('ar'), // Arabic
          const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), // Chinese Simplified
          // Currency-default requires country included
          const Locale("es", "AR"),
          const Locale("en", "AU"),
          const Locale("en", "US"),
          const Locale("pt", "BR"),
          const Locale("en", "CA"),
          const Locale("de", "CH"),
          const Locale("es", "CL"),
          const Locale("zh", "CN"),
          const Locale("cs", "CZ"),
          const Locale("da", "DK"),
          const Locale("fr", "FR"),
          const Locale("en", "GB"),
          const Locale("zh", "HK"),
          const Locale("hu", "HU"),
          const Locale("id", "ID"),
          const Locale("he", "IL"),
          const Locale("hi", "IN"),
          const Locale("ja", "JP"),
          const Locale("ko", "KR"),
          const Locale("es", "MX"),
          const Locale("ta", "MY"),
          const Locale("en", "NZ"),
          const Locale("tl", "PH"),
          const Locale("ur", "PK"),
          const Locale("pl", "PL"),
          const Locale("ru", "RU"),
          const Locale("sv", "SE"),
          const Locale("zh", "SG"),
          const Locale("th", "TH"),
          const Locale("tr", "TR"),
          const Locale("en", "TW"),
          const Locale("es", "VE"),
          const Locale("en", "ZA"),
          const Locale("en", "US"),
          const Locale("es", "AR"),
          const Locale("de", "AT"),
          const Locale("fr", "BE"),
          const Locale("de", "BE"),
          const Locale("nl", "BE"),
          const Locale("tr", "CY"),
          const Locale("et", "EE"),
          const Locale("fi", "FI"),
          const Locale("fr", "FR"),
          const Locale("el", "GR"),
          const Locale("es", "AR"),
          const Locale("en", "IE"),
          const Locale("it", "IT"),
          const Locale("es", "AR"),
          const Locale("lv", "LV"),
          const Locale("lt", "LT"),
          const Locale("fr", "LU"),
          const Locale("en", "MT"),
          const Locale("nl", "NL"),
          const Locale("pt", "PT"),
          const Locale("sk", "SK"),
          const Locale("sl", "SI"),
          const Locale("es", "ES"),
          const Locale("ar", "AE"), // UAE
          const Locale("ar", "SA"), // Saudi Arabia
          const Locale("ar", "KW"), // Kuwait          
        ],
      ),
    );
  }
}

/// Splash
/// Default page route that determines if user is logged in and routes them appropriately.
class Splash extends StatefulWidget {
  @override
  SplashState createState() => SplashState();
}

class SplashState extends State<Splash> with WidgetsBindingObserver {
  bool _hasCheckedLoggedIn;

  Future checkLoggedIn({bool retry = false, bool legacyStorage = false}) async {
    try {
      if (!_hasCheckedLoggedIn) {
        _hasCheckedLoggedIn = true;
        if (await sl.get<SharedPrefsUtil>().getFirstLaunch()) {
          await sl.get<SharedPrefsUtil>().deleteAll(firstLaunch: true);
          await sl.get<Vault>().deleteAll();
          await sl.get<SharedPrefsUtil>().setFirstLaunch();
          Navigator.of(context).pushReplacementNamed('/intro_welcome');
        } else if ((await sl.get<Vault>().getPrivateKey() != null) &&
            (await sl.get<SharedPrefsUtil>().getPrivateKeyBackedUp())) {
          if (await sl.get<SharedPrefsUtil>().getLock() || await sl.get<SharedPrefsUtil>().shouldLock()) {
            Navigator.of(context).pushReplacementNamed('/lock_screen', arguments: TransitionOption.NONE);
          } else {
            walletState.requestUpdate();
            Navigator.of(context).pushReplacementNamed('/overview',
              arguments: TransitionOption.NONE);
          }
        } else {
          Navigator.of(context).pushReplacementNamed('/intro_welcome');
        }
      }
    } catch (e) {
      // Attempt to retry if this failed
      if (!retry) {
        await sl.get<Vault>().deleteAll();
        await sl.get<SharedPrefsUtil>().deleteAll();
        checkLoggedIn(retry: true, legacyStorage: false);
      } else if (Platform.isAndroid && e.toString().contains("flutter_secure") && !legacyStorage) {
        /// Fallback secure storage
        /// A very small percentage of users are encountering issues writing to the
        /// Android keyStore using the flutter_secure_storage plugin.
        ///
        /// Instead of telling them they are out of luck, this is an automatic "fallback"
        /// It will generate a 64-byte secret using the native android "bottlerocketstudios" Vault
        /// This secret is used to encrypt sensitive data and save it in SharedPreferences
        if (!(await sl.get<SharedPrefsUtil>().useLegacyStorage())) {
          await sl.get<SharedPrefsUtil>().setUseLegacyStorage();
          checkLoggedIn(retry: true, legacyStorage: true);
        }
      }
    }
  }

  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addObserver(this);
    _hasCheckedLoggedIn = false;
    if (SchedulerBinding.instance.schedulerPhase ==
        SchedulerPhase.persistentCallbacks) {
      SchedulerBinding.instance.addPostFrameCallback((_) => checkLoggedIn());
    }
  }

  @override
  void dispose() {
    WidgetsBinding.instance.removeObserver(this);
    super.dispose();
  }

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    // Account for user changing locale when leaving the app
    switch (state) {
      case AppLifecycleState.paused:
        super.didChangeAppLifecycleState(state);
        break;
      case AppLifecycleState.resumed:
        setLanguage();
        super.didChangeAppLifecycleState(state);
        break;
      default:
        super.didChangeAppLifecycleState(state);
        break;
    }
  }

  void setLanguage() {
    setState(() {
      StateContainer.of(context).deviceLocale = Localizations.localeOf(context);
    });
    sl.get<SharedPrefsUtil>().getLanguage().then((setting) {
      setState(() {
        StateContainer.of(context).updateLanguage(setting);
      });
    });    
  }

  void setDeviceLocaleAndCurrency() {
    setState(() {
      StateContainer.of(context).deviceLocale = Localizations.localeOf(context);
      sl.get<SharedPrefsUtil>().getCurrency(StateContainer.of(context).deviceLocale).then((currency) {
        StateContainer.of(context).curCurrency = currency;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    setDeviceLocaleAndCurrency();
    setLanguage();
    return Scaffold(
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
    );
  }
}


<|start_filename|>test/crypto/fixtures/privatekey.dart<|end_filename|>
class PrivateKeyFixtures {
  List<Map<String, dynamic>> curve714;
  List<Map<String, dynamic>> curve715;
  List<Map<String, dynamic>> curve716;
  List<Map<String, dynamic>> curve729;

  PrivateKeyFixtures() {
    curve714 = [
      {
        "encrypted":
            "53616C7465645F5FED4A37ECAD2BF13FF24A66DDA299A57632520447B28B9E642C4B2A301CACC217FBD7713F6282C20CCCFDC5FFD2AB93A8E48D8C2C81704D36",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "CA02200046B7A086680D208272F6982F574FE226042F30D049F9A226283FC3346506411D"
      },
      {
        "encrypted":
            "53616C7465645F5FB3431FD46EB80DE81273E0181F170552DE01506A9C91D47269312A81841C82B7F55014CEA471A7D8D3187DA2D10B4F9A8481DA7911CCC1A2",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "CA02200066C8426FA1DC0980DBDEE7F8656AE6FCA9EF746975E3FFB9EB425B53638C0175"
      },
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "<KEY>"
      }
    ];
    curve715 = [
      {
        "encrypted":
            "53616C7465645F5FE1C85F75A6E3D75EF916DD9F60E14660F9C63A8AE407060EAA6F7CF373CB830B6E50D27EC46B013602A75305BD3D6433669607846D7335C9A1849664E8A35DD8E5FDECF40CAE5325",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "<KEY>"
      },
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "CB023000FCABEC25AAA049A524CEA1D69360711C1EB4E83D86D2CB45B0EFA1F69B218CCABE3CF0A16AE8ED170919B7B39D1C390E"
      },
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "CB023000225EDA615DBF3F296B295E76454444024E5F1CF17D5275135C00CDCADF966889890F5618874D95A9EEFF22B6DDCF9C4A"
      }
    ];
    curve716 = [
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "CC02420001F4C77C1DC868F62A96DD74343B9C03C594F6E42DA3A0139D6988D45D75FBC167E6D98D1F101D4FE8F8D58514F7571399E4548A017645609F5F575176849A38335B"
      },
      {
        "encrypted":
            "53616C7465645F5FA78798633EC647B4BCCC1240730C24E5852B649C3930EF7F9703018D4ED62000B254A875A021B32CFB7B8E87C2C19099CF6E7F1F9E76556F4391A00B118EB6A8EECCFB4CA19C4333B2A7393EF1A88D200D257E3A32DC4C0B",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "CC024100E9551B5AD9D9084DD878E224BE718E2929892FC03A5420DCC9A8B9AB5260B47A039D3838DB32D003141AEB1C2F53A285A78470D65AAD2222B2A4C9B279AF76CBF1"
      },
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "<KEY>"
      }
    ];
    curve729 = [
      {
        "encrypted":
            "53616C7465645F5F096AF812ED1B1275E123BAF0F351A50554CC62C50C6181AD6313B5E6A319F6ABAF9A1CC29FFA47162355E5A731F379420B7FB6ACC92F9F82",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "D9022300252A9478A7C732CE80E1BE5E2F529050F8521D8F7FEC3C0C8EA2936307244AF9F38E55"
      },
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "<KEY>"
      },
      {
        "encrypted":
            "<KEY>",
        "password": "<PASSWORD>",
        "b58_pubkey":
            "<KEY>",
        "enc_privkey":
            "<KEY>"
      }
    ];
  }
}


<|start_filename|>lib/network/model/response/borrow_response.dart<|end_filename|>
import 'package:json_annotation/json_annotation.dart';
import 'package:pascaldart/pascaldart.dart';

part 'borrow_response.g.dart';

DateTime _toDateTime(int v) {
  return v == null ? null : DateTime.fromMillisecondsSinceEpoch(v);
}

int _fromDateTime(DateTime v) {
  return v?.millisecondsSinceEpoch;
}

@JsonSerializable()
class BorrowResponse {
  @JsonKey(name:'pasa', fromJson: intToAccountNum, toJson: accountNumToInt)
  AccountNumber account;

  @JsonKey(
      name: 'expires',
      fromJson: _toDateTime,
      toJson: _fromDateTime,
      includeIfNull: false)
  DateTime expiry;

  @JsonKey(
      name: 'price',
      includeIfNull: false,
      toJson: currencyToDouble,
      fromJson: pascalToCurrency)
  Currency price;

  @JsonKey(name: 'paid')
  bool paid;

  @JsonKey(name: 'transferred')
  bool transferred;

  BorrowResponse();

  factory BorrowResponse.fromJson(Map<String, dynamic> json) => _$BorrowResponseFromJson(json);
  Map<String, dynamic> toJson() => _$BorrowResponseToJson(this);
}

<|start_filename|>test/common/sha_test.dart<|end_filename|>
import 'package:pascaldart/common.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('Common.Sha', () {
    List<Map<String, String>> sha256data;
    List<Map<String, String>> sha512data;

    setUp(() {
      sha256data = [
        {
          "input": "",
          "expected":
              "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"
        },
        {
          "input": "HashLib4Pascal",
          "expected":
              "BCF45544CB98DDAB731927F8760F81821489ED04C0792A4D254134887BEA9E38"
        },
        {
          "input": "123456789",
          "expected":
              "15E2B0D3C33891EBB0F1EF609EC419420C20E320CE94C65FBC8C3312448EB225"
        },
        {
          "input": "abcde",
          "expected":
              "36BBE50ED96841D10443BCB670D6554F0A34B761BE67EC9C4A8AD2C0C44CA42C"
        }
      ];
      sha512data = [
        {
          "input": "",
          "expected":
              "CF83E1357EEFB8BDF1542850D66D8007D620E4050B5715DC83F4A921D36CE9CE47D0D13C5D85F2B0FF8318D2877EEC2F63B931BD47417A81A538327AF927DA3E"
        },
        {
          "input": "HashLib4Pascal",
          "expected":
              "0A5DA12B113EBD3DEA4C51FD10AFECF1E2A8EE6C3848A0DD4407141ADDA04375068D85A1EEF980FAFF68DC3BF5B1B3FBA31344178042197B5180BD95530D61AC"
        },
        {
          "input": "123456789",
          "expected":
              "D9E6762DD1C8EAF6D61B3C6192FC408D4D6D5F1176D0C29169BC24E71C3F274AD27FCD5811B313D681F7E55EC02D73D499C95455B6B5BB503ACF574FBA8FFE85"
        },
        {
          "input": "abcde",
          "expected":
              "878AE65A92E86CAC011A570D4C30A7EAEC442B85CE8ECA0C2952B5E3CC0628C2E79D889AD4D5C7C626986D452DD86374B6FFAA7CD8B67665BEF2289A5C70B0A1"
        }
      ];
    });

    test('SHA256 Test', () {
      String result;
      sha256data.forEach((hash) {
        result = PDUtil.byteToHex(
            Sha.sha256([PDUtil.stringToBytesUtf8(hash['input'])]));
        expect(result, hash['expected']);
      });
    });
    test('SHA512 Test', () {
      String result;
      sha512data.forEach((hash) {
        result = PDUtil.byteToHex(
            Sha.sha512([PDUtil.stringToBytesUtf8(hash['input'])]));

        expect(result, hash['expected']);
      });
    });
  });
}


<|start_filename|>lib/bus/authenticated_event.dart<|end_filename|>

import 'package:event_taxi/event_taxi.dart';

enum AUTH_EVENT_TYPE { SEND, TRANSFER, CHANGE, BACKUP, LIST_FORSALE, DELIST_FORSALE }

class AuthenticatedEvent implements Event {
  final AUTH_EVENT_TYPE authType;

  AuthenticatedEvent(this.authType);
}

<|start_filename|>lib/ui/widgets/pin_screen.dart<|end_filename|>
import 'dart:math';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/util/haptic_util.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

enum PinOverlayType { NEW_PIN, ENTER_PIN }

class ShakeCurve extends Curve {
  @override
  double transform(double t) {
    //t from 0.0 to 1.0
    return sin(t * 3 * pi);
  }
}

class PinScreen extends StatefulWidget {
  final PinOverlayType type;
  final String expectedPin;
  final String description;
  final Function onSuccess;

  PinScreen(
      {@required this.type,
      @required this.onSuccess,
      this.description = "",
      this.expectedPin = ""});

  @override
  _PinScreenState createState() => _PinScreenState();
}

class _PinScreenState extends State<PinScreen>
    with SingleTickerProviderStateMixin {
  static const int MAX_ATTEMPTS = 5;
  static const int PIN_LENGTH = 6;

  String pinEnterTitle = "";
  String pinCreateTitle = "";

  // Stateful data
  List<IconData> _dotStates;
  String _pin;
  String _pinConfirmed;
  bool
      _awaitingConfirmation; // true if pin has been entered once, false if not entered once
  String _header;
  int _failedAttempts = 0;

  // Invalid animation
  AnimationController _controller;
  Animation<double> _animation;

  @override
  void initState() {
    super.initState();
    // Initialize list all empty
    if (widget.type == PinOverlayType.ENTER_PIN) {
      _header = pinEnterTitle;
    } else {
      _header = pinCreateTitle;
    }
    _dotStates = List.filled(PIN_LENGTH, FontAwesomeIcons.circle);
    _awaitingConfirmation = false;
    _pin = "";
    _pinConfirmed = "";
    // Get adjusted failed attempts
    sl.get<SharedPrefsUtil>().getLockAttempts().then((attempts) {
      setState(() {
        _failedAttempts = attempts % MAX_ATTEMPTS;
      });
    });
    // Set animation
    _controller = AnimationController(
        duration: const Duration(milliseconds: 350), vsync: this);
    final Animation curve =
        CurvedAnimation(parent: _controller, curve: ShakeCurve());
    _animation = Tween(begin: 0.0, end: 25.0).animate(curve)
      ..addStatusListener((status) {
        if (status == AnimationStatus.completed) {
          if (widget.type == PinOverlayType.ENTER_PIN) {
            sl.get<SharedPrefsUtil>().incrementLockAttempts().then((_) {
              _failedAttempts++;
              if (_failedAttempts >= MAX_ATTEMPTS) {
                setState(() {
                  _controller.value = 0;
                });
                sl.get<SharedPrefsUtil>().updateLockDate().then((_) {
                  Navigator.of(context).pushNamedAndRemoveUntil(
                      '/lock_screen', (Route<dynamic> route) => false);
                });
              } else {
                setState(() {
                  _pin = "";
                  _header = AppLocalization.of(context).invalidPINParagraph;
                  _dotStates = List.filled(PIN_LENGTH, FontAwesomeIcons.circle);
                  _controller.value = 0;
                });
              }
            });
          } else {
            setState(() {
              _awaitingConfirmation = false;
              _dotStates = List.filled(PIN_LENGTH, FontAwesomeIcons.circle);
              _pin = "";
              _pinConfirmed = "";
              _header = AppLocalization.of(context).noMatchPINParagraph;
              _controller.value = 0;
            });
          }
        }
      })
      ..addListener(() {
        setState(() {
          // the animation object’s value is the changed state
        });
      });
  }

  /// Set next character in the pin set
  /// return true if all characters entered
  bool _setCharacter(String character) {
    if (_awaitingConfirmation) {
      setState(() {
        _pinConfirmed = _pinConfirmed + character;
      });
    } else {
      setState(() {
        _pin = _pin + character;
      });
    }
    for (int i = 0; i < _dotStates.length; i++) {
      if (_dotStates[i] == FontAwesomeIcons.circle) {
        setState(() {
          _dotStates[i] = FontAwesomeIcons.solidCircle;
        });
        break;
      }
    }
    if (_dotStates.last == FontAwesomeIcons.solidCircle) {
      return true;
    }
    return false;
  }

  void _backSpace() {
    if (_dotStates[0] != FontAwesomeIcons.circle) {
      int lastFilledIndex;
      for (int i = 0; i < _dotStates.length; i++) {
        if (_dotStates[i] == FontAwesomeIcons.solidCircle) {
          if (i == _dotStates.length ||
              _dotStates[i + 1] == FontAwesomeIcons.circle) {
            lastFilledIndex = i;
            break;
          }
        }
      }
      setState(() {
        _dotStates[lastFilledIndex] = FontAwesomeIcons.circle;
        if (_awaitingConfirmation) {
          _pinConfirmed = _pinConfirmed.substring(0, _pinConfirmed.length - 1);
        } else {
          _pin = _pin.substring(0, _pin.length - 1);
        }
      });
    }
  }

  Widget buildPINButton(String text) {
    return Container(
      width: MediaQuery.of(context).size.width / 4,
      height: MediaQuery.of(context).size.width / 4,
      child: text == ""
          ? SizedBox()
          : InkWell(
              // Real tap function
              onTapDown: (details) {
                if (_controller.status == AnimationStatus.forward ||
                    _controller.status == AnimationStatus.reverse) {
                  return;
                }
                if (text == "-") {
                  _backSpace();
                } else {
                  if (_setCharacter(text)) {
                    // Mild delay so they can actually see the last dot get filled
                    Future.delayed(Duration(milliseconds: 50), () {
                      if (widget.type == PinOverlayType.ENTER_PIN) {
                        // Pin is not what was expected
                        if (_pin != widget.expectedPin) {
                          HapticUtil.error();
                          _controller.forward();
                        } else {
                          sl
                              .get<SharedPrefsUtil>()
                              .resetLockAttempts()
                              .then((_) {
                            widget.onSuccess(_pin);
                          });
                        }
                      } else {
                        if (!_awaitingConfirmation) {
                          // Switch to confirm pin
                          setState(() {
                            _awaitingConfirmation = true;
                            _dotStates = List.filled(
                                PIN_LENGTH, FontAwesomeIcons.circle);
                            _header = AppLocalization.of(context).confirmPINParagraph;
                          });
                        } else {
                          // First and second pins match
                          if (_pin == _pinConfirmed) {
                            widget.onSuccess(_pin);
                          } else {
                            HapticUtil.error();
                            _controller.forward();
                          }
                        }
                      }
                    });
                  }
                }
              },
              // For the splash effect
              onTap: () {},
              borderRadius:
                  BorderRadius.circular(MediaQuery.of(context).size.width / 8),
              child: Center(
                child: text == "-"
                    ? Icon(
                        Icons.backspace,
                        color: StateContainer.of(context).curTheme.primary,
                      )
                    : Text(
                        text,
                        style: AppStyles.pinNumberPad(context),
                      ),
              ),
            ),
    );
  }

  List<Widget> buildPINScreenDots() {
    List<Widget> ret = List();
    for (int i = 0; i < PIN_LENGTH; i++) {
      ret.add(
        Container(
          margin: EdgeInsetsDirectional.fromSTEB(4, 0, 4, 0),
          child: Icon(_dotStates[i],
              size: 18,
              color: StateContainer.of(context).curTheme.backgroundPrimary),
        ),
      );
    }
    return ret;
  }

  @override
  Widget build(BuildContext context) {
    if (pinEnterTitle.isEmpty) {
      setState(() {
        pinEnterTitle = AppLocalization.of(context).enterPINParagraph;
        if (widget.type == PinOverlayType.ENTER_PIN) {
          _header = pinEnterTitle;
        }
      });
    }
    if (pinCreateTitle.isEmpty) {
      setState(() {
        pinCreateTitle = AppLocalization.of(context).createPINParagraph;
        if (widget.type == PinOverlayType.NEW_PIN) {
          _header = pinCreateTitle;
        }
      });
    }
    // Main scaffold that holds everything
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      // A Stack to achive the overlap between background gradient and number pad
      body: LayoutBuilder(
        builder: (context, constraints) => Stack(
          children: <Widget>[
            // Pin Text & Dots
            Container(
              height: MediaQuery.of(context).size.height -
                  (MediaQuery.of(context).size.width * 5 / 4),
              width: double.maxFinite,
              padding: EdgeInsetsDirectional.fromSTEB(
                  0,
                  MediaQuery.of(context).padding.top,
                  0,
                  MediaQuery.of(context).padding.top),
              decoration: BoxDecoration(
                  gradient:
                      StateContainer.of(context).curTheme.gradientPrimary),
              child: Center(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    // PIN header
                    Container(
                      margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0),
                      child: AutoSizeText(
                        _header,
                        style: AppStyles.modalHeader(context),
                        textAlign: TextAlign.center,
                        maxLines: 1,
                        minFontSize: 10,
                        stepGranularity: 0.1,
                      ),
                    ),
                    // PIN description
                    widget.description == null
                        ? Container(
                            margin:
                                EdgeInsetsDirectional.fromSTEB(30, 4, 30, 0),
                            child: AutoSizeText(
                              widget.description,
                              textAlign: TextAlign.center,
                              style: AppStyles.pinDescription(context),
                              maxLines: 2,
                              minFontSize: 10,
                              stepGranularity: 0.1,
                            ),
                          )
                        : SizedBox(),
                    // Dots
                    Container(
                      margin: EdgeInsetsDirectional.only(
                          start: MediaQuery.of(context).size.width * 0.25 +
                              _animation.value,
                          end: MediaQuery.of(context).size.width * 0.25 -
                              _animation.value,
                          top: 16),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: buildPINScreenDots(),
                      ),
                    ),
                  ],
                ),
              ),
            ),
            // Number Pad
            Align(
              alignment: Alignment.bottomCenter,
              child: Container(
                height: MediaQuery.of(context).size.width * 5 / 4 + 16,
                width: double.maxFinite,
                padding: EdgeInsetsDirectional.fromSTEB(
                    MediaQuery.of(context).size.width * 0.075,
                    MediaQuery.of(context).size.width * 0.075,
                    MediaQuery.of(context).size.width * 0.075,
                    MediaQuery.of(context).padding.bottom +
                        MediaQuery.of(context).size.width * 0.075),
                decoration: BoxDecoration(
                  color: StateContainer.of(context).curTheme.backgroundPrimary,
                  borderRadius: BorderRadius.only(
                    topLeft: Radius.circular(12),
                    topRight: Radius.circular(12),
                  ),
                  boxShadow: [
                    StateContainer.of(context).curTheme.shadowBottomBar,
                  ],
                ),
                child: Material(
                  color: Colors.transparent,
                  child: Center(
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.spaceAround,
                      children: <Widget>[
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceAround,
                          children: <Widget>[
                            buildPINButton("1"),
                            buildPINButton("2"),
                            buildPINButton("3"),
                          ],
                        ),
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceAround,
                          children: <Widget>[
                            buildPINButton("4"),
                            buildPINButton("5"),
                            buildPINButton("6"),
                          ],
                        ),
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceAround,
                          children: <Widget>[
                            buildPINButton("7"),
                            buildPINButton("8"),
                            buildPINButton("9"),
                          ],
                        ),
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceAround,
                          children: <Widget>[
                            buildPINButton(""),
                            buildPINButton("0"),
                            buildPINButton("-"),
                          ],
                        ),
                      ],
                    ),
                  ),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}


<|start_filename|>lib/network/model/request/freepasa_verify_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';

part 'freepasa_verify_request.g.dart';

@JsonSerializable()
class FreePASAVerifyRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'request_id')
  String requestId;

  @JsonKey(name:'code')
  String code;

  FreePASAVerifyRequest({@required this.requestId, @required this.code}) : super() {
    this.action = 'freepasa_verify';
  }

  factory FreePASAVerifyRequest.fromJson(Map<String, dynamic> json) => _$FreePASAVerifyRequestFromJson(json);
  Map<String, dynamic> toJson() => _$FreePASAVerifyRequestToJson(this);
}

<|start_filename|>lib/store/wallet/wallet.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'wallet.dart';

// **************************************************************************
// StoreGenerator
// **************************************************************************

// ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic

mixin _$Wallet on WalletBase, Store {
  final _$walletLoadingAtom = Atom(name: 'WalletBase.walletLoading');

  @override
  bool get walletLoading {
    _$walletLoadingAtom.context.enforceReadPolicy(_$walletLoadingAtom);
    _$walletLoadingAtom.reportObserved();
    return super.walletLoading;
  }

  @override
  set walletLoading(bool value) {
    _$walletLoadingAtom.context.conditionallyRunInAction(() {
      super.walletLoading = value;
      _$walletLoadingAtom.reportChanged();
    }, _$walletLoadingAtom, name: '${_$walletLoadingAtom.name}_set');
  }

  final _$totalWalletBalanceAtom = Atom(name: 'WalletBase.totalWalletBalance');

  @override
  Currency get totalWalletBalance {
    _$totalWalletBalanceAtom.context
        .enforceReadPolicy(_$totalWalletBalanceAtom);
    _$totalWalletBalanceAtom.reportObserved();
    return super.totalWalletBalance;
  }

  @override
  set totalWalletBalance(Currency value) {
    _$totalWalletBalanceAtom.context.conditionallyRunInAction(() {
      super.totalWalletBalance = value;
      _$totalWalletBalanceAtom.reportChanged();
    }, _$totalWalletBalanceAtom, name: '${_$totalWalletBalanceAtom.name}_set');
  }

  final _$walletAccountsAtom = Atom(name: 'WalletBase.walletAccounts');

  @override
  List<PascalAccount> get walletAccounts {
    _$walletAccountsAtom.context.enforceReadPolicy(_$walletAccountsAtom);
    _$walletAccountsAtom.reportObserved();
    return super.walletAccounts;
  }

  @override
  set walletAccounts(List<PascalAccount> value) {
    _$walletAccountsAtom.context.conditionallyRunInAction(() {
      super.walletAccounts = value;
      _$walletAccountsAtom.reportChanged();
    }, _$walletAccountsAtom, name: '${_$walletAccountsAtom.name}_set');
  }

  final _$rpcClientAtom = Atom(name: 'WalletBase.rpcClient');

  @override
  RPCClient get rpcClient {
    _$rpcClientAtom.context.enforceReadPolicy(_$rpcClientAtom);
    _$rpcClientAtom.reportObserved();
    return super.rpcClient;
  }

  @override
  set rpcClient(RPCClient value) {
    _$rpcClientAtom.context.conditionallyRunInAction(() {
      super.rpcClient = value;
      _$rpcClientAtom.reportChanged();
    }, _$rpcClientAtom, name: '${_$rpcClientAtom.name}_set');
  }

  final _$publicKeyAtom = Atom(name: 'WalletBase.publicKey');

  @override
  PublicKey get publicKey {
    _$publicKeyAtom.context.enforceReadPolicy(_$publicKeyAtom);
    _$publicKeyAtom.reportObserved();
    return super.publicKey;
  }

  @override
  set publicKey(PublicKey value) {
    _$publicKeyAtom.context.conditionallyRunInAction(() {
      super.publicKey = value;
      _$publicKeyAtom.reportChanged();
    }, _$publicKeyAtom, name: '${_$publicKeyAtom.name}_set');
  }

  final _$accountStateMapAtom = Atom(name: 'WalletBase.accountStateMap');

  @override
  Map<int, Account> get accountStateMap {
    _$accountStateMapAtom.context.enforceReadPolicy(_$accountStateMapAtom);
    _$accountStateMapAtom.reportObserved();
    return super.accountStateMap;
  }

  @override
  set accountStateMap(Map<int, Account> value) {
    _$accountStateMapAtom.context.conditionallyRunInAction(() {
      super.accountStateMap = value;
      _$accountStateMapAtom.reportChanged();
    }, _$accountStateMapAtom, name: '${_$accountStateMapAtom.name}_set');
  }

  final _$localCurrencyPriceAtom = Atom(name: 'WalletBase.localCurrencyPrice');

  @override
  double get localCurrencyPrice {
    _$localCurrencyPriceAtom.context
        .enforceReadPolicy(_$localCurrencyPriceAtom);
    _$localCurrencyPriceAtom.reportObserved();
    return super.localCurrencyPrice;
  }

  @override
  set localCurrencyPrice(double value) {
    _$localCurrencyPriceAtom.context.conditionallyRunInAction(() {
      super.localCurrencyPrice = value;
      _$localCurrencyPriceAtom.reportChanged();
    }, _$localCurrencyPriceAtom, name: '${_$localCurrencyPriceAtom.name}_set');
  }

  final _$btcPriceAtom = Atom(name: 'WalletBase.btcPrice');

  @override
  double get btcPrice {
    _$btcPriceAtom.context.enforceReadPolicy(_$btcPriceAtom);
    _$btcPriceAtom.reportObserved();
    return super.btcPrice;
  }

  @override
  set btcPrice(double value) {
    _$btcPriceAtom.context.conditionallyRunInAction(() {
      super.btcPrice = value;
      _$btcPriceAtom.reportChanged();
    }, _$btcPriceAtom, name: '${_$btcPriceAtom.name}_set');
  }

  final _$uuidAtom = Atom(name: 'WalletBase.uuid');

  @override
  String get uuid {
    _$uuidAtom.context.enforceReadPolicy(_$uuidAtom);
    _$uuidAtom.reportObserved();
    return super.uuid;
  }

  @override
  set uuid(String value) {
    _$uuidAtom.context.conditionallyRunInAction(() {
      super.uuid = value;
      _$uuidAtom.reportChanged();
    }, _$uuidAtom, name: '${_$uuidAtom.name}_set');
  }

  final _$activeAccountAtom = Atom(name: 'WalletBase.activeAccount');

  @override
  AccountNumber get activeAccount {
    _$activeAccountAtom.context.enforceReadPolicy(_$activeAccountAtom);
    _$activeAccountAtom.reportObserved();
    return super.activeAccount;
  }

  @override
  set activeAccount(AccountNumber value) {
    _$activeAccountAtom.context.conditionallyRunInAction(() {
      super.activeAccount = value;
      _$activeAccountAtom.reportChanged();
    }, _$activeAccountAtom, name: '${_$activeAccountAtom.name}_set');
  }

  final _$borrowedAccountAtom = Atom(name: 'WalletBase.borrowedAccount');

  @override
  BorrowResponse get borrowedAccount {
    _$borrowedAccountAtom.context.enforceReadPolicy(_$borrowedAccountAtom);
    _$borrowedAccountAtom.reportObserved();
    return super.borrowedAccount;
  }

  @override
  set borrowedAccount(BorrowResponse value) {
    _$borrowedAccountAtom.context.conditionallyRunInAction(() {
      super.borrowedAccount = value;
      _$borrowedAccountAtom.reportChanged();
    }, _$borrowedAccountAtom, name: '${_$borrowedAccountAtom.name}_set');
  }

  final _$isBorrowEligibleAtom = Atom(name: 'WalletBase.isBorrowEligible');

  @override
  bool get isBorrowEligible {
    _$isBorrowEligibleAtom.context.enforceReadPolicy(_$isBorrowEligibleAtom);
    _$isBorrowEligibleAtom.reportObserved();
    return super.isBorrowEligible;
  }

  @override
  set isBorrowEligible(bool value) {
    _$isBorrowEligibleAtom.context.conditionallyRunInAction(() {
      super.isBorrowEligible = value;
      _$isBorrowEligibleAtom.reportChanged();
    }, _$isBorrowEligibleAtom, name: '${_$isBorrowEligibleAtom.name}_set');
  }

  final _$hasExceededBorrowLimitAtom =
      Atom(name: 'WalletBase.hasExceededBorrowLimit');

  @override
  bool get hasExceededBorrowLimit {
    _$hasExceededBorrowLimitAtom.context
        .enforceReadPolicy(_$hasExceededBorrowLimitAtom);
    _$hasExceededBorrowLimitAtom.reportObserved();
    return super.hasExceededBorrowLimit;
  }

  @override
  set hasExceededBorrowLimit(bool value) {
    _$hasExceededBorrowLimitAtom.context.conditionallyRunInAction(() {
      super.hasExceededBorrowLimit = value;
      _$hasExceededBorrowLimitAtom.reportChanged();
    }, _$hasExceededBorrowLimitAtom,
        name: '${_$hasExceededBorrowLimitAtom.name}_set');
  }

  final _$hasReceivedSubscribeResponseAtom =
      Atom(name: 'WalletBase.hasReceivedSubscribeResponse');

  @override
  bool get hasReceivedSubscribeResponse {
    _$hasReceivedSubscribeResponseAtom.context
        .enforceReadPolicy(_$hasReceivedSubscribeResponseAtom);
    _$hasReceivedSubscribeResponseAtom.reportObserved();
    return super.hasReceivedSubscribeResponse;
  }

  @override
  set hasReceivedSubscribeResponse(bool value) {
    _$hasReceivedSubscribeResponseAtom.context.conditionallyRunInAction(() {
      super.hasReceivedSubscribeResponse = value;
      _$hasReceivedSubscribeResponseAtom.reportChanged();
    }, _$hasReceivedSubscribeResponseAtom,
        name: '${_$hasReceivedSubscribeResponseAtom.name}_set');
  }

  final _$initializeRpcAsyncAction = AsyncAction('initializeRpc');

  @override
  Future<void> initializeRpc() {
    return _$initializeRpcAsyncAction.run(() => super.initializeRpc());
  }

  final _$getBalanceAndInsertBorrowedAsyncAction =
      AsyncAction('getBalanceAndInsertBorrowed');

  @override
  Future<dynamic> getBalanceAndInsertBorrowed() {
    return _$getBalanceAndInsertBorrowedAsyncAction
        .run(() => super.getBalanceAndInsertBorrowed());
  }

  final _$updateBorrowedAsyncAction = AsyncAction('updateBorrowed');

  @override
  Future<dynamic> updateBorrowed() {
    return _$updateBorrowedAsyncAction.run(() => super.updateBorrowed());
  }

  final _$initiateBorrowAsyncAction = AsyncAction('initiateBorrow');

  @override
  Future<dynamic> initiateBorrow() {
    return _$initiateBorrowAsyncAction.run(() => super.initiateBorrow());
  }

  final _$findAccountsRequestAsyncAction = AsyncAction('findAccountsRequest');

  @override
  Future<RPCResponse> findAccountsRequest(FindAccountsRequest request) {
    return _$findAccountsRequestAsyncAction
        .run(() => super.findAccountsRequest(request));
  }

  final _$findAccountsWithNameLikeAsyncAction =
      AsyncAction('findAccountsWithNameLike');

  @override
  Future<List<PascalAccount>> findAccountsWithNameLike(String name) {
    return _$findAccountsWithNameLikeAsyncAction
        .run(() => super.findAccountsWithNameLike(name));
  }

  final _$loadWalletAsyncAction = AsyncAction('loadWallet');

  @override
  Future<bool> loadWallet() {
    return _$loadWalletAsyncAction.run(() => super.loadWallet());
  }

  final _$requestUpdateAsyncAction = AsyncAction('requestUpdate');

  @override
  Future<void> requestUpdate() {
    return _$requestUpdateAsyncAction.run(() => super.requestUpdate());
  }

  final _$fcmUpdateAsyncAction = AsyncAction('fcmUpdate');

  @override
  Future<void> fcmUpdate(AccountNumber account) {
    return _$fcmUpdateAsyncAction.run(() => super.fcmUpdate(account));
  }

  final _$fcmDeleteAccountAsyncAction = AsyncAction('fcmDeleteAccount');

  @override
  Future<void> fcmDeleteAccount(AccountNumber account) {
    return _$fcmDeleteAccountAsyncAction
        .run(() => super.fcmDeleteAccount(account));
  }

  final _$fcmUpdateBulkAsyncAction = AsyncAction('fcmUpdateBulk');

  @override
  Future<void> fcmUpdateBulk({bool forceDisable = false}) {
    return _$fcmUpdateBulkAsyncAction
        .run(() => super.fcmUpdateBulk(forceDisable: forceDisable));
  }

  final _$WalletBaseActionController = ActionController(name: 'WalletBase');

  @override
  Account getAccountState(PascalAccount account) {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.getAccountState(account);
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void changeRpcUrl(String rpcUrl) {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.changeRpcUrl(rpcUrl);
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void removeAccount(PascalAccount account) {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.removeAccount(account);
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void updateAccountName(PascalAccount account, AccountName newName) {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.updateAccountName(account, newName);
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  List<PascalAccount> getNonzeroBalanceAccounts() {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.getNonzeroBalanceAccounts();
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  bool shouldHaveFee() {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.shouldHaveFee();
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  String getLocalCurrencyDisplay(
      {AvailableCurrency currency, Currency amount, int decimalDigits}) {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.getLocalCurrencyDisplay(
          currency: currency, amount: amount, decimalDigits: decimalDigits);
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void disconnect() {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.disconnect();
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void reconnect() {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.reconnect();
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void addNewOp(PascalOperation op) {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.addNewOp(op);
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  void reset() {
    final _$actionInfo = _$WalletBaseActionController.startAction();
    try {
      return super.reset();
    } finally {
      _$WalletBaseActionController.endAction(_$actionInfo);
    }
  }

  @override
  String toString() {
    final string =
        'walletLoading: ${walletLoading.toString()},totalWalletBalance: ${totalWalletBalance.toString()},walletAccounts: ${walletAccounts.toString()},rpcClient: ${rpcClient.toString()},publicKey: ${publicKey.toString()},accountStateMap: ${accountStateMap.toString()},localCurrencyPrice: ${localCurrencyPrice.toString()},btcPrice: ${btcPrice.toString()},uuid: ${uuid.toString()},activeAccount: ${activeAccount.toString()},borrowedAccount: ${borrowedAccount.toString()},isBorrowEligible: ${isBorrowEligible.toString()},hasExceededBorrowLimit: ${hasExceededBorrowLimit.toString()},hasReceivedSubscribeResponse: ${hasReceivedSubscribeResponse.toString()}';
    return '{$string}';
  }
}


<|start_filename|>lib/network/model/request/fcm_update_bulk_request.dart<|end_filename|>
import 'package:blaise_wallet_flutter/network/model/base_request.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';

part 'fcm_update_bulk_request.g.dart';

@JsonSerializable()
class FcmUpdateBulkRequest extends BaseRequest {
  @JsonKey(name:'action')
  String action;

  @JsonKey(name:'account', includeIfNull: false)
  List<int> accounts;

  @JsonKey(name:'b58_pubkey', includeIfNull: false)
  String b58pubkey;

  @JsonKey(name:'fcm_token', includeIfNull: false)
  String fcmToken;

  @JsonKey(name:'enabled')
  bool enabled;

  FcmUpdateBulkRequest({@required this.accounts, @required this.fcmToken, @required this.enabled, @required this.b58pubkey}) : super() {
    this.action = 'fcm_update_bulk';
  }

  factory FcmUpdateBulkRequest.fromJson(Map<String, dynamic> json) => _$FcmUpdateBulkRequestFromJson(json);
  Map<String, dynamic> toJson() => _$FcmUpdateBulkRequestToJson(this);
}

<|start_filename|>test/common/fixtures/publickey.dart<|end_filename|>
class PublicKeyFixtures {
  List<Map<String, dynamic>> curve714;
  List<Map<String, dynamic>> curve715;
  List<Map<String, dynamic>> curve716;
  List<Map<String, dynamic>> curve729;

  PublicKeyFixtures() {
    curve714 = [
      {
        "ec_nid": 714,
        "x": "<KEY>",
        "y": "F8362CB5EE97113D93880303E99B63208CEBDB62D49874D739E33DFFFD3C4162",
        "enc_pubkey":
            "CA0220006E75266E1865288874BFE1C3A9686BCF4D22CADCC250B134EA2C470A9E3F912B2000F8362CB5EE97113D93880303E99B63208CEBDB62D49874D739E33DFFFD3C4162",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 714,
        "x": "1FD6019F7FBFCD9A34491643287402FB0CCB77F2A4F99482ADC11137CDF1FBD6",
        "y": "46924461A9069850A64E48E8EDB9C88764D3A0DC74AF929E335719F8A65B809B",
        "enc_pubkey":
            "<KEY>",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 714,
        "x": "209E3EF49EBED0BE1D9583589CD4B8F365966592E3644FFA243A1941480C676A",
        "y": "61DEA0745D3892C2A056CA4C071A8C1F38AB1CAA99EAC43636B800D71B0553C2",
        "enc_pubkey":
            "CA022000209E3EF49EBED0BE1D9583589CD4B8F365966592E3644FFA243A1941480C676A200061DEA0745D3892C2A056CA4C071A8C1F38AB1CAA99EAC43636B800D71B0553C2",
        "b58_pubkey":
            "<KEY>"
      }
    ];
    curve715 = [
      {
        "ec_nid": 715,
        "x":
            "BB536B465C54D36644BBA2F42DD664EB4AF7E441D5F80892E4FB4DC289E3D8E826A736114D7BC9F5E89FB4C498611520",
        "y":
            "<KEY>",
        "enc_pubkey":
            "<KEY>",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 715,
        "x":
            "<KEY>",
        "y":
            "FEFDBF5649030F19D4F1725B29C1B9A3C677EEFEA56CB8D084479DCC5A307A04153C6297971ED72E39FAEA31E9000E34",
        "enc_pubkey":
            "<KEY>",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 715,
        "x":
            "FEAB4CE80AA556DF0A487B67F5EE043D5AA977B1DF9A9B5379ADB4D8E981FDFE89FFBDA6D07380FAE7F811A51B5B0640",
        "y":
            "DB340DDDA596C9A0563C339B17B40F431F3AED1F5A9D79B9F3A72E0C08C74987813A5D929161F35E1E1D9B9DDE946C38",
        "enc_pubkey":
            "CB023000FEAB4CE80AA556DF0A487B67F5EE043D5AA977B1DF9A9B5379ADB4D8E981FDFE89FFBDA6D07380FAE7F811A51B5B06403000DB340DDDA596C9A0563C339B17B40F431F3AED1F5A9D79B9F3A72E0C08C74987813A5D929161F35E1E1D9B9DDE946C38",
        "b58_pubkey":
            "<KEY>"
      }
    ];
    curve716 = [
      {
        "ec_nid": 716,
        "x":
            "<KEY>",
        "y":
            "450B01A829CD036553859C48DDE2E7DD832FB4021B5CD07FEE3C46F5B238ECA935C046854C6DA89DB3BF9212F2FAB53A93B20C09BE54CEAA176AC493982328FBA4",
        "enc_pubkey":
            "CC0242000182EF9FEFDC476E4CDD19874FB40B42CCD192BA507C964861E393B9AD7FD68F2516141AD3A9264D8C8D4C695086F45EAF6E878FF5B9FC11B317E5871A4F71CBB81D4100450B01A829CD036553859C48DDE2E7DD832FB4021B5CD07FEE3C46F5B238ECA935C046854C6DA89DB3BF9212F2FAB53A93B20C09BE54CEAA176AC493982328FBA4",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 716,
        "x":
            "2A33CFF7E6F75FA4F0EA32A5DED773ADA3C18D67A334DD89820B658BD5E38EE101094B00A1558136F8F2F53BF9778AE92ADA48E2F77F03A3A4F0B2A50D3A3798B5",
        "y":
            "BE20E8BCC886C01ABBA58FEBCDABE0EE17E6D0A4695A70D753EB82D6074EE8868BF0562E0A615B394FBB5537B90A1C15CE98F9D21DABC45A8F1CBBF9CD0A740D71",
        "enc_pubkey":
            "CC0241002A33CFF7E6F75FA4F0EA32A5DED773ADA3C18D67A334DD89820B658BD5E38EE101094B00A1558136F8F2F53BF9778AE92ADA48E2F77F03A3A4F0B2A50D3A3798B54100BE20E8BCC886C01ABBA58FEBCDABE0EE17E6D0A4695A70D753EB82D6074EE8868BF0562E0A615B394FBB5537B90A1C15CE98F9D21DABC45A8F1CBBF9CD0A740D71",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 716,
        "x":
            "<KEY>",
        "y":
            "<KEY>",
        "enc_pubkey":
            "<KEY>",
        "b58_pubkey":
            "<KEY>"
      }
    ];
    curve729 = [
      {
        "ec_nid": 729,
        "x":
            "0101F596D1D86DED3882C21A6E9912BAC0ABDA8C717D8729F11923DABAD313950C9D6AFF",
        "y":
            "<KEY>",
        "enc_pubkey":
            "<KEY>",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 729,
        "x":
            "07C6FD9F07F4F13B5FFBEC8D85D1F20D87C001235FEDC4730AC019DC687669A04D1108A5",
        "y":
            "<KEY>",
        "enc_pubkey":
            "<KEY>",
        "b58_pubkey":
            "<KEY>"
      },
      {
        "ec_nid": 729,
        "x":
            "<KEY>",
        "y":
            "035C917A8D63AE33D1FFF193BE5555DD7C52E5D36338A31B77B9009D9669668625B0AD3C",
        "enc_pubkey":
            "D902240006D5F0F67401DCB8B923B6202D4D8FB0F0F6F76CAE235DAEC163ACCDEF7F4DF57731F5452400035C917A8D63AE33D1FFF193BE5555DD7C52E5D36338A31B77B9009D9669668625B0AD3C",
        "b58_pubkey":
            "<KEY>"
      }
    ];
  }
}


<|start_filename|>lib/ui/overview/confirm_free_account_sheet.dart<|end_filename|>
import 'dart:ui';

import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/network/http_client.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/routes.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/tap_outside_unfocus.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/material.dart';
import 'package:keyboard_avoider/keyboard_avoider.dart';
import 'package:logger/logger.dart';
import 'package:pascaldart/pascaldart.dart';

class ConfirmFreeAccountSheet extends StatefulWidget {
  final String requestId;

  ConfirmFreeAccountSheet({@required this.requestId}) : super();

  _ConfirmFreeAccountSheetState createState() =>
      _ConfirmFreeAccountSheetState();
}

class _ConfirmFreeAccountSheetState extends State<ConfirmFreeAccountSheet> {
  final Logger log = sl.get<Logger>();
  OverlayEntry _overlay;
  TextEditingController codeController;

  @override
  void initState() {
    super.initState();
    this.codeController = TextEditingController();
    log.d("confirming with request ID '${widget.requestId}'");
  }

  void showOverlay(BuildContext context) {
    OverlayState overlayState = Overlay.of(context);
    _overlay = OverlayEntry(
      builder: (context) => BackdropFilter(
            filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
            child: Container(
              width: double.maxFinite,
              height: double.maxFinite,
              color: StateContainer.of(context).curTheme.overlay20,
              child: Center(
                child: //Container for the animation
                    Container(
                  margin: EdgeInsetsDirectional.only(
                      top: MediaQuery.of(context).padding.top),
                  //Width/Height ratio for the animation is needed because BoxFit is not working as expected
                  width: double.maxFinite,
                  height: MediaQuery.of(context).size.width,
                  child: Center(
                    child: FlareActor(
                      StateContainer.of(context).curTheme.animationGetAccount,
                      animation: "main",
                      fit: BoxFit.contain,
                    ),
                  ),
                ),
              ),
            ),
          ),
    );
    overlayState.insert(_overlay);
  }

  @override
  Widget build(BuildContext context) {
    return TapOutsideUnfocus(
      child: Column(
        children: <Widget>[
          Expanded(
            child: Container(
              decoration: BoxDecoration(
                color: StateContainer.of(context).curTheme.backgroundPrimary,
                borderRadius: BorderRadius.only(
                  topLeft: Radius.circular(12),
                  topRight: Radius.circular(12),
                ),
              ),
              child: Column(
                children: <Widget>[
                  // Sheet header
                  Container(
                    height: 60,
                    width: double.maxFinite,
                    decoration: BoxDecoration(
                      gradient:
                          StateContainer.of(context).curTheme.gradientPrimary,
                      borderRadius: BorderRadius.only(
                        topLeft: Radius.circular(12),
                        topRight: Radius.circular(12),
                      ),
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: <Widget>[
                        // Sized Box
                        SizedBox(
                          height: 50,
                          width: 65,
                        ),
                        // Header
                        Container(
                          width: MediaQuery.of(context).size.width - 130,
                          alignment: Alignment(0, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).freeAccountSheetHeader.toUpperCase(),
                            style: AppStyles.header(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                            textAlign: TextAlign.center,
                          ),
                        ),
                        // Sized Box
                        SizedBox(
                          height: 50,
                          width: 65,
                        ),
                      ],
                    ),
                  ),
                  Expanded(
                    child: Column(
                      children: <Widget>[
                        //Container for the paragraph
                        Container(
                          alignment: Alignment(-1, 0),
                          margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                          child: AutoSizeText(
                            AppLocalization.of(context).enterConfirmationCodeParagraph,
                            maxLines: 3,
                            stepGranularity: 0.1,
                            style: AppStyles.paragraph(context),
                          ),
                        ),
                        Expanded(
                          child: KeyboardAvoider(
                            duration: Duration(milliseconds: 0),
                            autoScroll: true,
                            focusPadding: 40,
                            child: Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: <Widget>[
                                // Container for SMS confirmation code
                                Container(
                                  margin: EdgeInsetsDirectional.fromSTEB(
                                      30, 30, 30, 30),
                                  child: AppTextField(
                                    label: AppLocalization.of(context).confirmationCodeTextFieldHeader,
                                    style: AppStyles.paragraphMedium(context),
                                    inputType: TextInputType.number,
                                    maxLines: 1,
                                    controller: codeController,
                                  ),
                                ),
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                  //"CONFIRM" and "Go Back" buttons
                  Row(
                    children: <Widget>[
                      AppButton(
                        type: AppButtonType.Primary,
                        text: toUppercase(AppLocalization.of(context).confirmButton, context),
                        buttonTop: true,
                        onPressed: () async {
                          showOverlay(context);
                          bool success = await verifyFreepasaAccount();
                          _overlay?.remove();
                          if (success) {
                            walletState.loadWallet();
                            Navigator.popUntil(context, RouteUtils.withNameLike('/overview'));
                            UIUtil.showSnackbar(AppLocalization.of(context).freepasaComplete, context);
                          }
                        },
                      ),
                    ],
                  ),
                  // "Close" button
                  Row(
                    children: <Widget>[
                      AppButton(
                        type: AppButtonType.PrimaryOutline,
                        text: toUppercase(AppLocalization.of(context).goBackButton, context),
                        onPressed: () {
                          Navigator.of(context).pop();
                        },
                      ),
                    ],
                  ),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }

  /// Verify a freepasa request, return true if valid, false if not
  Future<bool> verifyFreepasaAccount() async {
    try {
      log.d("Sending request to verify freePASA rid: '${widget.requestId}', code ${codeController.text}");
      int response = await HttpAPI.verifyFreePASA(
        widget.requestId,
        codeController.text
      );
      if (response == null) {
        log.w("Null response from HttpAPI.verifyFreePASA");
        UIUtil.showSnackbar(AppLocalization.of(context).somethingWentWrongError, context);
        return false;
      } else if (response < 0) {
        log.d("Invalid confirmation code entered at freepasa verify");
        UIUtil.showSnackbar(AppLocalization.of(context).confirmationCodeError, context);
        return false;
      }
      AccountNumber account = AccountNumber.fromInt(response);
      await sl.get<SharedPrefsUtil>().setFreepasaAccount(account);
      return true;
    } catch (e) {
      log.e("Caught exception at freepasa verify ${e.toString()}", e);
      return false;
    } 
  }
}


<|start_filename|>lib/ui/intro/intro_welcome.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/model/available_languages.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/overlay_dialog.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:flutter/material.dart';
import 'package:flare_flutter/flare_actor.dart';

class IntroWelcomePage extends StatefulWidget {
  @override
  _IntroWelcomePageState createState() => _IntroWelcomePageState();
}

class _IntroWelcomePageState extends State<IntroWelcomePage> {

  List<DialogListItem> getLanguageList() {
    List<DialogListItem> ret = [];
    AvailableLanguage.values.forEach((AvailableLanguage value) {
      LanguageSetting setting = LanguageSetting(value);
      ret.add(DialogListItem(
          option: setting.getDisplayName(context),
          action: () {
            if (setting != StateContainer.of(context).curLanguage) {
              sl
                  .get<SharedPrefsUtil>()
                  .setLanguage(setting)
                  .then((result) {
                StateContainer.of(context).updateLanguage(setting);
              });
            }
            Navigator.of(context).pop();
          }));
    });
    return ret;
  }


  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      body: LayoutBuilder(
        builder: (context, constraints) => Column(
          children: <Widget>[
            //A widget that holds welcome animation + paragraph
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  // A stack for background gradient and the animation
                  Stack(
                    children: <Widget>[
                      // Container for the gradient background
                      Container(
                        height: (MediaQuery.of(context).padding.top +
                                (MediaQuery.of(context).size.width *
                                    262 /
                                    400)) -
                            (MediaQuery.of(context).size.width * 80 / 400),
                        decoration: BoxDecoration(
                          gradient: StateContainer.of(context)
                              .curTheme
                              .gradientPrimary,
                        ),
                      ),
                      //Container for the animation
                      Container(
                        margin: EdgeInsetsDirectional.only(
                            top: MediaQuery.of(context).padding.top),
                        //Width/Height ratio for the animation is needed because BoxFit is not working as expected
                        width: double.maxFinite,
                        height: MediaQuery.of(context).size.width * 262 / 400,
                        child: Center(
                          child: FlareActor(
                            StateContainer.of(context)
                                .curTheme
                                .animationWelcome,
                            animation: "main",
                            fit: BoxFit.contain,
                          ),
                        ),
                      ),
                    ],
                  ),
                  //Container for the paragraph
                  Expanded(
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        Container(
                          margin: EdgeInsets.symmetric(horizontal: 30),
                          child: AutoSizeText(
                            AppLocalization.of(context).welcomeParagraph,
                            maxLines: 4,
                            stepGranularity: 0.1,
                            style: AppStyles.paragraph(context),
                          ),
                        ),
                        // "Language" button
                        Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: <Widget>[
                            Container(
                              height: 40.0,
                              decoration: BoxDecoration(
                                borderRadius: BorderRadius.circular(100.0),
                                color: StateContainer.of(context)
                                    .curTheme
                                    .backgroundPrimary,
                                boxShadow: [
                                  StateContainer.of(context)
                                      .curTheme
                                      .shadowTextDark,
                                ],
                              ),
                              margin:
                                  EdgeInsetsDirectional.fromSTEB(30, 20, 30, 0),
                              child: FlatButton(
                                shape: RoundedRectangleBorder(
                                    borderRadius: BorderRadius.circular(120.0)),
                                child: Container(
                                  constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width-100),
                                  padding: EdgeInsetsDirectional.only(start: 4, end: 4),
                                  child: AutoSizeText.rich(
                                    TextSpan(children: [
                                      TextSpan(
                                        text: AppLocalization.of(context).languageColonHeader,
                                        style: TextStyle(
                                            fontSize: 14,
                                            color: StateContainer.of(context)
                                                .curTheme
                                                .primary,
                                            fontWeight: FontWeight.w600),
                                      ),
                                      TextSpan(
                                        text: " ",
                                        style: TextStyle(
                                            fontSize: 14,
                                            color: StateContainer.of(context)
                                                .curTheme
                                                .primary,
                                            fontWeight: FontWeight.w600),
                                      ),
                                      TextSpan(
                                        text: StateContainer.of(context).curLanguage.getDisplayName(context),
                                        style: TextStyle(
                                            fontSize: 14,
                                            color: StateContainer.of(context)
                                                .curTheme
                                                .textDark,
                                            fontWeight: FontWeight.w400),
                                      ),
                                    ]),
                                    textAlign: TextAlign.center,
                                    maxLines: 1,
                                    stepGranularity: 0.1,
                                    style: TextStyle(fontSize: 14),
                                  ),
                                ),
                                onPressed: () {
                                  showAppDialog(
                                      context: context,
                                      builder: (_) => DialogOverlay(
                                          title: AppLocalization.of(context)
                                              .languageHeader,
                                          optionsList: getLanguageList()));
                                },
                              ),
                            ),
                          ],
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            ),

            //"New Private Key" and "Import Private Key" buttons
            Row(
              children: <Widget>[
                AppButton(
                  type: AppButtonType.Primary,
                  text: AppLocalization.of(context).newPrivateKeyButton,
                  buttonTop: true,
                  onPressed: () {
                    Navigator.of(context).pushNamed('/intro_security_first');
                  },
                ),
              ],
            ),
            // "Import Private Key" button
            Row(
              children: <Widget>[
                AppButton(
                  type: AppButtonType.PrimaryOutline,
                  text: AppLocalization.of(context).importPrivateKeyButton,
                  onPressed: () {
                    Navigator.of(context)
                        .pushNamed('/intro_import_private_key');
                  },
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}


<|start_filename|>lib/l10n/messages_ca.dart<|end_filename|>
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
// This is a library that provides messages for a ca locale. All the
// messages from the main program should be duplicated here with the same
// function name.

// Ignore issues from commonly used lints in this file.
// ignore_for_file:unnecessary_brace_in_string_interps, unnecessary_new
// ignore_for_file:prefer_single_quotes,comment_references, directives_ordering
// ignore_for_file:annotate_overrides,prefer_generic_function_type_aliases
// ignore_for_file:unused_import, file_names

import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';

final messages = new MessageLookup();

typedef String MessageIfAbsent(String messageStr, List<dynamic> args);

class MessageLookup extends MessageLookupByLibrary {
  String get localeName => 'ca';

  final messages = _notInlinedMessages(_notInlinedMessages);
  static _notInlinedMessages(_) => <String, Function> {
    "accountBalanceHeader" : MessageLookupByLibrary.simpleMessage("Saldo del compte"),
    "accountOPDetails" : MessageLookupByLibrary.simpleMessage("compte"),
    "accountPriceOPDetails" : MessageLookupByLibrary.simpleMessage("Preu del compte"),
    "accountTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Compte"),
    "accountToSendFromHeader" : MessageLookupByLibrary.simpleMessage("Compte per enviar des"),
    "accountsHeader" : MessageLookupByLibrary.simpleMessage("Comptes"),
    "addADurationButton" : MessageLookupByLibrary.simpleMessage("+ Afegir una Durada"),
    "addAPayloadButton" : MessageLookupByLibrary.simpleMessage("+ Afegir un concepte (Payload)"),
    "addContactButton" : MessageLookupByLibrary.simpleMessage("Afegeix contacte"),
    "addContactSheetHeader" : MessageLookupByLibrary.simpleMessage("Afegeix contacte"),
    "addFeeHeader" : MessageLookupByLibrary.simpleMessage("Afegir tarifa"),
    "addToContactsButton" : MessageLookupByLibrary.simpleMessage("Afegir a contactes"),
    "addedToContactsParagraph" : MessageLookupByLibrary.simpleMessage("% 1 afegit als contactes"),
    "addressTextFieldHeader" : MessageLookupByLibrary.simpleMessage("adreça"),
    "amountRequiredError" : MessageLookupByLibrary.simpleMessage("Quantitat obligatòria"),
    "amountTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Import"),
    "areYouSureHeader" : MessageLookupByLibrary.simpleMessage("Estàs segur?"),
    "authenticateOnLaunchHeader" : MessageLookupByLibrary.simpleMessage("Autentica\'t a Launch"),
    "authenticateToBackUpParagraph" : MessageLookupByLibrary.simpleMessage("Autentiqueu la còpia de seguretat de clau privada"),
    "authenticateToChangeNameParagraph" : MessageLookupByLibrary.simpleMessage("Autentica per canviar el nom del compte a \"% 1\""),
    "authenticateToCreatePrivateSaleParagraph" : MessageLookupByLibrary.simpleMessage("Autentiqueu-vos per crear venda privada"),
    "authenticateToDelistParagraph" : MessageLookupByLibrary.simpleMessage("Autentifica\'t per eliminar la compte des de la venda"),
    "authenticateToListForSaleParagraph" : MessageLookupByLibrary.simpleMessage("Autentica la llista del compte en venda"),
    "authenticateToSendParagraph" : MessageLookupByLibrary.simpleMessage("Autentica per enviar% 1 Pascal"),
    "authenticateToTransferParagraph" : MessageLookupByLibrary.simpleMessage("Autentica la transferència del compte"),
    "authenticateToUnlockParagraph" : MessageLookupByLibrary.simpleMessage("Autentica per desbloquejar Blaise"),
    "authenticationBiometricsHeader" : MessageLookupByLibrary.simpleMessage("Biometria"),
    "authenticationMethodHeader" : MessageLookupByLibrary.simpleMessage("Mètode d\'autenticació"),
    "authenticationPINHeader" : MessageLookupByLibrary.simpleMessage("PIN"),
    "automaticallyLockHeader" : MessageLookupByLibrary.simpleMessage("Bloquejar automàticament"),
    "backUpKeyHeader" : MessageLookupByLibrary.simpleMessage("Fes una còpia de seguretat de la clau"),
    "backUpPrivateKeyHeader" : MessageLookupByLibrary.simpleMessage("Còpia de seguretat de clau privada"),
    "backUpSheetHeader" : MessageLookupByLibrary.simpleMessage("Còpia de seguretat"),
    "backupEncryptedKeyFirstParagraph" : MessageLookupByLibrary.simpleMessage("A continuació, trobareu la vostra clau privada xifrada. Està protegit per una contrasenya. Podeu emmagatzemar-lo de forma segura en un gestor de contrasenyes per a la vostra comoditat."),
    "backupEncryptedKeySecondParagraph" : MessageLookupByLibrary.simpleMessage("Com que està xifrada amb la vostra contrasenya, si perds o oblides la teva contrasenya, no podràs desxifrar-la ni accedir als teus fons."),
    "backupKeyFirstParagraph" : MessageLookupByLibrary.simpleMessage("Teniu dues opcions per fer una còpia de seguretat de la vostra clau privada:"),
    "backupKeyFourthParagraph" : MessageLookupByLibrary.simpleMessage("Recomanem guardar fora de línia la versió no xifrada, escrivint-la en un tros de paper. Podeu emmagatzemar la versió xifrada en un gestor de contrasenyes per a la vostra comoditat."),
    "backupKeySecondParagraph" : MessageLookupByLibrary.simpleMessage("1- Encriptat, el que significa que està protegit amb una contrasenya."),
    "backupKeyThirdParagraph" : MessageLookupByLibrary.simpleMessage("2- No xifrat, cosa que significa que és brut i no protegit per una contrasenya."),
    "backupUnencryptedKeyParagraph" : MessageLookupByLibrary.simpleMessage("A continuació, trobareu la vostra clau privada sense xifrar. <colored> No està protegit per una contrasenya, cosa que significa que és important guardar-la en algun lloc segur i fora de línia. </colored> Recomanem escriure-la en un tros de paper."),
    "balanceHeader" : MessageLookupByLibrary.simpleMessage("Equilibri"),
    "blockOPDetails" : MessageLookupByLibrary.simpleMessage("bloc"),
    "blockchainRewardOPDetails" : MessageLookupByLibrary.simpleMessage("Recompensa Blockchain (% 1)"),
    "borrowAccountParagraph" : MessageLookupByLibrary.simpleMessage("Per comprar un compte, primer haurà de demanar un préstec gratuït. Si envieu almenys <colored>% 1 Pascal (% 2) </colored> al compte dins de <colored>% 3 dies </colored>, el compte serà vostre i <colored>% 1 Pascal </colored> es descomptarà automàticament del vostre saldo. \n En cas contrari, ens retornarà al final de <colored>% 3 dies </colored> i ja no pertanyrà a la vostra cartera. \n Es recomana només envieu una petita quantitat de monedes fins que no teniu el compte."),
    "borrowAnAccountButton" : MessageLookupByLibrary.simpleMessage("Elimina un compte"),
    "borrowStarted" : MessageLookupByLibrary.simpleMessage("S\'ha iniciat la compra per a% 1"),
    "borrowedAccountHeader" : MessageLookupByLibrary.simpleMessage("Compte prestat"),
    "borrowedAccountPaidParagraph" : MessageLookupByLibrary.simpleMessage("<colored> El vostre compte s\'ha comprat! </colored> \n La transferència es processa actualment. Aquest procés sol durar uns 15 minuts <colored> </colored>, en alguns casos pot trigar una mica més."),
    "borrowedAccountParagraph" : MessageLookupByLibrary.simpleMessage("Aquest és un <colored> compte prestat </colored>. \n Si li envieu almenys <colored>% 1 Pascal </colored> en els següents <colored>% 2 dies,% 3 hores i% 4 minuts </colored>, ja serà teu."),
    "borrowedHeader" : MessageLookupByLibrary.simpleMessage("Prestat"),
    "borrowedTransferredHeader" : MessageLookupByLibrary.simpleMessage("Transferència pendent"),
    "buyAccountOPDetails" : MessageLookupByLibrary.simpleMessage("Compra del compte (% 1)"),
    "buyAccountSheetHeader" : MessageLookupByLibrary.simpleMessage("Compra el compte"),
    "buyAnAccountButton" : MessageLookupByLibrary.simpleMessage("Comprar un compte"),
    "cancelButton" : MessageLookupByLibrary.simpleMessage("Cancel·lar"),
    "cantSendToYourselfError" : MessageLookupByLibrary.simpleMessage("No es pot enviar a tu mateix"),
    "changeAccountInfoOPDetails" : MessageLookupByLibrary.simpleMessage("Canvia la informació del compte (% 1)"),
    "changeAccountNameHeader" : MessageLookupByLibrary.simpleMessage("Canvieu el nom del compte"),
    "changeDaemonButton" : MessageLookupByLibrary.simpleMessage("Canvia de servidor"),
    "changeDaemonParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu una adreça per utilitzar un dimoni Pascal diferent per a sol·licituds RPC."),
    "changeDaemonSheetHeader" : MessageLookupByLibrary.simpleMessage("Canvia de dimoni"),
    "changeKeyOPDetails" : MessageLookupByLibrary.simpleMessage("Canvia la clau (% 1)"),
    "changeKeySignedOPDetails" : MessageLookupByLibrary.simpleMessage("Canvia la signada amb clau (% 1)"),
    "changeNameButton" : MessageLookupByLibrary.simpleMessage("Canviar el nom"),
    "changeNameParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu un nom a continuació per canviar el nom del vostre compte."),
    "changeNameSheetHeader" : MessageLookupByLibrary.simpleMessage("Canvieu el nom"),
    "changedNameParagraph" : MessageLookupByLibrary.simpleMessage("El vostre nom del compte s\'ha canviat correctament."),
    "changedNameSheetHeader" : MessageLookupByLibrary.simpleMessage("Canviat"),
    "changingAccountOPDetails" : MessageLookupByLibrary.simpleMessage("Canvi de compte"),
    "changingNameParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu el nom del compte nou per continuar."),
    "changingNameSheetHeader" : MessageLookupByLibrary.simpleMessage("Canviant"),
    "checkOutBlaiseParagraph" : MessageLookupByLibrary.simpleMessage("Fes una ullada a Blaise! Cartera de <NAME>zilla, elegant i segura per a iOS i Android: https://blaisewallet.com"),
    "closeButton" : MessageLookupByLibrary.simpleMessage("Tanca"),
    "confirmButton" : MessageLookupByLibrary.simpleMessage("Confirmar"),
    "confirmPINParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu el PIN"),
    "confirmPasswordTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Confirma la contrassenya"),
    "confirmTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Confirmeu"),
    "confirmationCodeError" : MessageLookupByLibrary.simpleMessage("No s\'ha pogut verificar el codi, assegureu-vos que l\'heu introduït correctament"),
    "confirmationCodeTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Codi de confirmació"),
    "connectingHeader" : MessageLookupByLibrary.simpleMessage("Connectant"),
    "contactAlreadyExistsError" : MessageLookupByLibrary.simpleMessage("El contacte ja existeix"),
    "contactDoesntExistError" : MessageLookupByLibrary.simpleMessage("El contacte no existeix"),
    "contactNameTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Nom de contacte"),
    "contactSheetHeader" : MessageLookupByLibrary.simpleMessage("Contacte"),
    "contactsHeader" : MessageLookupByLibrary.simpleMessage("Contactes"),
    "copiedAddressButton" : MessageLookupByLibrary.simpleMessage("Adreça copiada"),
    "copiedButton" : MessageLookupByLibrary.simpleMessage("Copiat"),
    "copyAddressButton" : MessageLookupByLibrary.simpleMessage("Copiar adreça"),
    "copyButton" : MessageLookupByLibrary.simpleMessage("Còpia"),
    "copyEncryptedKeyButton" : MessageLookupByLibrary.simpleMessage("Copia la clau xifrada"),
    "copyKeyButton" : MessageLookupByLibrary.simpleMessage("Copia la clau privada"),
    "copyPublicKeyButton" : MessageLookupByLibrary.simpleMessage("Copia la clau pública"),
    "copyUnencryptedKeyButton" : MessageLookupByLibrary.simpleMessage("Copia la clau sense xifrar"),
    "countryCodeTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Codi del país"),
    "createPINParagraph" : MessageLookupByLibrary.simpleMessage("Creeu un PIN de 6 dígits"),
    "createPrivateSaleButton" : MessageLookupByLibrary.simpleMessage("Crear una venda privada"),
    "createPrivateSaleHeader" : MessageLookupByLibrary.simpleMessage("Crea venda privada"),
    "createPrivateSaleParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu un preu, un compte de recepció i una clau pública a continuació per crear una venda privada per a aquest compte."),
    "createPrivateSaleSheetHeader" : MessageLookupByLibrary.simpleMessage("Venda privada"),
    "createdPrivateSaleParagraph" : MessageLookupByLibrary.simpleMessage("La venda privada s\'ha creat correctament. Us informarem si es compra."),
    "createdPrivateSaleSheetHeader" : MessageLookupByLibrary.simpleMessage("Creat"),
    "creatingPrivateSaleParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu la informació següent."),
    "creatingPrivateSaleSheetHeader" : MessageLookupByLibrary.simpleMessage("Creació"),
    "currencyHeader" : MessageLookupByLibrary.simpleMessage("Moneda"),
    "daemonHeader" : MessageLookupByLibrary.simpleMessage("Dimoni"),
    "decryptAndImportKeyHeader" : MessageLookupByLibrary.simpleMessage("Desxifra i importa"),
    "defaultHeader" : MessageLookupByLibrary.simpleMessage("Per defecte"),
    "deletePrivateKeyAndLogoutButton" : MessageLookupByLibrary.simpleMessage("Suprimeix la clau privada\nTanca la sessió"),
    "delistAccountOPDetails" : MessageLookupByLibrary.simpleMessage("Suprimeix el compte (% 1)"),
    "delistFromSaleHeader" : MessageLookupByLibrary.simpleMessage("Elimina la venda"),
    "delistFromSaleParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu que voleu suprimir aquest compte des de la venda."),
    "delistedFromSaleHeader" : MessageLookupByLibrary.simpleMessage("Eliminat de la venda"),
    "delistedFromSaleParagraph" : MessageLookupByLibrary.simpleMessage("El vostre compte s\'ha suprimit correctament de la venda."),
    "delistedHeader" : MessageLookupByLibrary.simpleMessage("Suprimit"),
    "delistedSheetHeader" : MessageLookupByLibrary.simpleMessage("Suprimit"),
    "delistingSheetHeader" : MessageLookupByLibrary.simpleMessage("Suprimint"),
    "didNotGetResponseError" : MessageLookupByLibrary.simpleMessage("No s\'ha obtingut resposta del servidor"),
    "durationTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Durada"),
    "emptyPasswordError" : MessageLookupByLibrary.simpleMessage("La contrasenya no pot estar buida"),
    "encryptButton" : MessageLookupByLibrary.simpleMessage("Xifra"),
    "encryptKeyParagraph" : MessageLookupByLibrary.simpleMessage("Creeu una contrasenya nova per xifrar la vostra clau privada."),
    "encryptPayloadHeader" : MessageLookupByLibrary.simpleMessage("Xifra la càrrega útil"),
    "encryptSheetHeader" : MessageLookupByLibrary.simpleMessage("Xifra"),
    "encryptThePayloadHeader" : MessageLookupByLibrary.simpleMessage("Xifra la càrrega útil"),
    "encryptedKeyButton" : MessageLookupByLibrary.simpleMessage("Clau xifrada"),
    "enterConfirmationCodeParagraph" : MessageLookupByLibrary.simpleMessage("Us hem enviat un codi de confirmació, introduïu-lo a continuació."),
    "enterPINParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu el PIN"),
    "enterPINToUnlockParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu el PIN per desbloquejar Blaise"),
    "enterPhoneNumberParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu el vostre número de telèfon a continuació."),
    "failedToEncryptPayloadError" : MessageLookupByLibrary.simpleMessage("No s\'ha pogut xifrar la càrrega útil"),
    "failedToImportContactsError" : MessageLookupByLibrary.simpleMessage("No s\'ha pogut importar contactes"),
    "failedToRemoveFromContactsParagraph" : MessageLookupByLibrary.simpleMessage("No s\'ha pogut eliminar% 1 dels contactes"),
    "feeColonHeader" : MessageLookupByLibrary.simpleMessage("Taxa:"),
    "feeConfirmAmountParagraph" : MessageLookupByLibrary.simpleMessage("Per confirmar l’addició de taxa de Pascal% 1 a aquesta operació per continuar."),
    "feeOPDetails" : MessageLookupByLibrary.simpleMessage("quota"),
    "feeRequiredParagraph" : MessageLookupByLibrary.simpleMessage("Aquesta operació requereix un cànon."),
    "feeTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Comissió"),
    "forSaleHeader" : MessageLookupByLibrary.simpleMessage("A la venda"),
    "freeAccountSheetHeader" : MessageLookupByLibrary.simpleMessage("Compte gratuït"),
    "freepasaComplete" : MessageLookupByLibrary.simpleMessage("Amb èxit, el nou compte estarà disponible després de 1 confirmació de xarxa"),
    "getAFreeAccountButton" : MessageLookupByLibrary.simpleMessage("Obtenir un compte gratuït"),
    "getAccountFirstParagraph" : MessageLookupByLibrary.simpleMessage("Hi ha dues opcions per obtenir el teu primer compte:"),
    "getAccountSecondParagraph" : MessageLookupByLibrary.simpleMessage("1- Podeu obtenir un compte gratuït mitjançant el vostre número de telèfon. <colored> Només es permet un compte per número de telèfon. </colored>"),
    "getAccountSheetHeader" : MessageLookupByLibrary.simpleMessage("Obtén un compte"),
    "getAccountThirdParagraph" : MessageLookupByLibrary.simpleMessage("2- Podeu comprar tants comptes com vulgueu per <colored>% 1 Pascal (% 2). </colored>"),
    "getAccountThirdParagraphAlternative" : MessageLookupByLibrary.simpleMessage("2- Podeu comprar un compte per a <colored>% 1 Pascal (% 2). </colored> <colored> Comprar només un compte està permès per usuari. </colored>"),
    "getAccountThirdParagraphAlternative2" : MessageLookupByLibrary.simpleMessage("2- Podeu comprar un compte per a <colored>% 1 Pascal (% 2). </colored> <colored> Podeu comprar fins a% 3 comptes. </colored>"),
    "getAnAccountButton" : MessageLookupByLibrary.simpleMessage("Obtenir un compte"),
    "goBackButton" : MessageLookupByLibrary.simpleMessage("Torna"),
    "gotItButton" : MessageLookupByLibrary.simpleMessage("Ho tinc!"),
    "hideButton" : MessageLookupByLibrary.simpleMessage("Amaga"),
    "iHaveBackedItUpButton" : MessageLookupByLibrary.simpleMessage("Copia realitzada"),
    "importButton" : MessageLookupByLibrary.simpleMessage("Importa"),
    "importPrivateKeyButton" : MessageLookupByLibrary.simpleMessage("Importa clau privada"),
    "importPrivateKeyHeader" : MessageLookupByLibrary.simpleMessage("Importa clau privada"),
    "importPrivateKeyParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu la vostra clau privada a continuació."),
    "insufficientBalanceError" : MessageLookupByLibrary.simpleMessage("Saldo insuficient"),
    "invalidAccountError" : MessageLookupByLibrary.simpleMessage("Compte no vàlid"),
    "invalidAccountNameError" : MessageLookupByLibrary.simpleMessage("El nom del compte no és vàlid"),
    "invalidAddressError" : MessageLookupByLibrary.simpleMessage("Adreça no vàlida"),
    "invalidDestinationError" : MessageLookupByLibrary.simpleMessage("Destinació no vàlida"),
    "invalidPINParagraph" : MessageLookupByLibrary.simpleMessage("PIN no vàlid"),
    "invalidPasswordError" : MessageLookupByLibrary.simpleMessage("Contrasenya invàlida"),
    "invalidPhoneNumberParagraph" : MessageLookupByLibrary.simpleMessage("El número de telèfon no és vàlid"),
    "invalidPrivateKeyError" : MessageLookupByLibrary.simpleMessage("Clau privada no vàlida"),
    "invalidPublicKeyError" : MessageLookupByLibrary.simpleMessage("Clau pública no vàlida"),
    "invalidReceivingAccountError" : MessageLookupByLibrary.simpleMessage("Compte de recepció no vàlid"),
    "keyCopiedButton" : MessageLookupByLibrary.simpleMessage("Clau copiada"),
    "keyTypeNotSupportedHeader" : MessageLookupByLibrary.simpleMessage("Clau no compatible"),
    "keyTypeNotSupportedParagraph" : MessageLookupByLibrary.simpleMessage("Aquest tipus de clau privada encara no és compatible amb Blaise. Podeu crear una clau privada nova i transferir-ne els comptes mitjançant una cartera diferent."),
    "languageColonHeader" : MessageLookupByLibrary.simpleMessage("Llenguatge:"),
    "languageHeader" : MessageLookupByLibrary.simpleMessage("Llenguatge"),
    "listAccountForSaleHeader" : MessageLookupByLibrary.simpleMessage("Llista de compte en venda"),
    "listAccountForSaleOPDetails" : MessageLookupByLibrary.simpleMessage("Llista del compte en venda (% 1)"),
    "listForSaleButton" : MessageLookupByLibrary.simpleMessage("Posar a la venda"),
    "listForSaleParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu un preu i un compte que rebran el pagament per llistar aquest compte per vendre."),
    "listForSaleSheetHeader" : MessageLookupByLibrary.simpleMessage("Llistat en venda"),
    "listedForSaleHeader" : MessageLookupByLibrary.simpleMessage("Llistat en venda"),
    "listedForSaleParagraph" : MessageLookupByLibrary.simpleMessage("El vostre compte s\'ha llistat amb èxit per a la venda. Us informarem si algú la compra."),
    "listedForSaleSheetHeader" : MessageLookupByLibrary.simpleMessage("Enumerat"),
    "listingForSaleParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu el preu i el compte que rebrà el pagament."),
    "listingForSaleSheetHeader" : MessageLookupByLibrary.simpleMessage("Llistat"),
    "liveSupportButton" : MessageLookupByLibrary.simpleMessage("Assistència"),
    "lock15Header" : MessageLookupByLibrary.simpleMessage("Després de% 1 minuts"),
    "lock1Header" : MessageLookupByLibrary.simpleMessage("Després de% 1 minut"),
    "lock30Header" : MessageLookupByLibrary.simpleMessage("Després de% 1 minuts"),
    "lock5Header" : MessageLookupByLibrary.simpleMessage("Després de% 1 minuts"),
    "lock60Header" : MessageLookupByLibrary.simpleMessage("Després de% 1 minuts"),
    "lockInstantHeader" : MessageLookupByLibrary.simpleMessage("Instantàniament"),
    "lockedHeader" : MessageLookupByLibrary.simpleMessage("Bloquejat"),
    "lockedUntilBlockOPDetails" : MessageLookupByLibrary.simpleMessage("Bloquejat fins el bloc"),
    "logoutFirstDisclaimerParagraph" : MessageLookupByLibrary.simpleMessage("<colored> En tancar la sessió, suprimireu la clau privada i totes les dades relacionades amb Blaise d\'aquest dispositiu. </colored> Si la vostra clau privada no està feta una còpia de seguretat, no podreu tornar a accedir als vostres fons. Si hi ha una còpia de seguretat de la teva clau privada, no et preocuparà res."),
    "logoutHeader" : MessageLookupByLibrary.simpleMessage("Tancar sessió"),
    "logoutSecondDisclaimerParagraph" : MessageLookupByLibrary.simpleMessage("Esteu segur que heu fet una còpia de seguretat de la vostra clau privada? <colored> Sempre que hàgiu fet una còpia de seguretat de la vostra clau privada, no us haureu de preocupar. </colored>"),
    "looksLikeEncryptedKeyParagraph" : MessageLookupByLibrary.simpleMessage("Sembla que una clau privada xifrada, introduïu la contrasenya per desxifrar-la i importar-la."),
    "manageHeader" : MessageLookupByLibrary.simpleMessage("Gestiona"),
    "manyFailedAttemptsParagraph" : MessageLookupByLibrary.simpleMessage("Massa intents fallits de desbloqueig"),
    "maturationOPDetails" : MessageLookupByLibrary.simpleMessage("maduració"),
    "multioperationOPDetails" : MessageLookupByLibrary.simpleMessage("Multioperació (% 1)"),
    "naOPDetails" : MessageLookupByLibrary.simpleMessage("N / A"),
    "nameChangedHeader" : MessageLookupByLibrary.simpleMessage("Canviat el nom"),
    "nameRequiredError" : MessageLookupByLibrary.simpleMessage("El seu nom és obligatori"),
    "nameTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Nom"),
    "newAccountNameTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Nou nom del compte"),
    "newAccountParagraph" : MessageLookupByLibrary.simpleMessage("Aquest és el vostre nou compte. \n Un cop rebut <colored> Pascal </colored>, les operacions es mostraran com a continuació."),
    "newKeyBackUpConfirmParagraph" : MessageLookupByLibrary.simpleMessage("Esteu segur que heu creat una còpia de seguretat de la clau privada de la nova billetera?"),
    "newKeySecurityParagraph" : MessageLookupByLibrary.simpleMessage("A la pantalla següent, veureu la vostra clau privada nova. És una contrasenya per accedir als vostres fons. És fonamental que el feu una còpia de seguretat i no el compartiu mai amb ningú."),
    "newNameOPDetails" : MessageLookupByLibrary.simpleMessage("Nou nom"),
    "newPasswordTextFieldHeader" : MessageLookupByLibrary.simpleMessage("nova contrasenya"),
    "newPrivateKeyButton" : MessageLookupByLibrary.simpleMessage("Nova clau privada"),
    "newPrivateKeyHeader" : MessageLookupByLibrary.simpleMessage("Nova clau privada"),
    "newPrivateKeyParagraph" : MessageLookupByLibrary.simpleMessage("A continuació, es mostra la clau privada de la nova cartera. És fonamental que feu una còpia de seguretat de la clau privada i no la guardeu mai com a text de pantalla o captura de pantalla. Recomanem escriure-la en un tros de paper i guardar-la fora de línia."),
    "newPublicKeyOPDetails" : MessageLookupByLibrary.simpleMessage("Nova clau pública"),
    "newWalletGreetingParagraph" : MessageLookupByLibrary.simpleMessage("Benvingut a <colored> Blaise Wallet </colored>. \n Podeu començar obtenint un compte."),
    "nextButton" : MessageLookupByLibrary.simpleMessage("Pròxim"),
    "noContactsToExportError" : MessageLookupByLibrary.simpleMessage("No hi ha contactes per exportar"),
    "noContactsToImportError" : MessageLookupByLibrary.simpleMessage("No hi ha contactes a importar"),
    "noGoBackButton" : MessageLookupByLibrary.simpleMessage("No, torna enrere"),
    "noHeader" : MessageLookupByLibrary.simpleMessage("No"),
    "noMatchPINParagraph" : MessageLookupByLibrary.simpleMessage("Els PIN no coincideixen"),
    "noMatchPasswordError" : MessageLookupByLibrary.simpleMessage("Les contrasenyes no coincideixen"),
    "noResultsFound" : MessageLookupByLibrary.simpleMessage("Sense resultats"),
    "noperationOPDetails" : MessageLookupByLibrary.simpleMessage("n_operació"),
    "notificationsHeader" : MessageLookupByLibrary.simpleMessage("Notificacions"),
    "nullOPDetails" : MessageLookupByLibrary.simpleMessage("nul"),
    "offHeader" : MessageLookupByLibrary.simpleMessage("Desactivat"),
    "okayButton" : MessageLookupByLibrary.simpleMessage("Bé"),
    "okayGoBackButton" : MessageLookupByLibrary.simpleMessage("D\'acord, torna"),
    "onHeader" : MessageLookupByLibrary.simpleMessage("Encès"),
    "opblockOPDetails" : MessageLookupByLibrary.simpleMessage("opbloquejar"),
    "openInExplorerButton" : MessageLookupByLibrary.simpleMessage("Obriu a l\'Explorador"),
    "operationDetailsButton" : MessageLookupByLibrary.simpleMessage("Detalls de l\'operació"),
    "operationsHeader" : MessageLookupByLibrary.simpleMessage("Operacions"),
    "ophashOPDetails" : MessageLookupByLibrary.simpleMessage("ophash"),
    "optxtOPDetails" : MessageLookupByLibrary.simpleMessage("optxt"),
    "optypeOPDetails" : MessageLookupByLibrary.simpleMessage("òptic"),
    "otherOperationsHeader" : MessageLookupByLibrary.simpleMessage("Altres operacions"),
    "passwordTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Contrasenya"),
    "payloadOPDetails" : MessageLookupByLibrary.simpleMessage("Càrrega útil"),
    "payloadTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Càrrega útil"),
    "pendingHeader" : MessageLookupByLibrary.simpleMessage("Pendents"),
    "phoneNumberTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Número de telèfon"),
    "preferencesHeader" : MessageLookupByLibrary.simpleMessage("Preferències"),
    "priceRequiredError" : MessageLookupByLibrary.simpleMessage("El preu és obligatori"),
    "priceTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Preu"),
    "privacyPolicyHeader" : MessageLookupByLibrary.simpleMessage("Política de privacitat"),
    "privateKeySheetHeader" : MessageLookupByLibrary.simpleMessage("Clau privada"),
    "privateKeyTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Clau privada"),
    "privateSaleHeader" : MessageLookupByLibrary.simpleMessage("Venda privada"),
    "publicKeyParagraph" : MessageLookupByLibrary.simpleMessage("A continuació, es mostra la vostra clau pública. Com el seu nom indica, es pretén compartir públicament i demostrar que una operació particular pertany a la vostra clau privada."),
    "publicKeySheetHeader" : MessageLookupByLibrary.simpleMessage("Clau pública"),
    "publicKeyTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Clau pública"),
    "receiveAccountButton" : MessageLookupByLibrary.simpleMessage("Rep el compte"),
    "receiveAnAccountButton" : MessageLookupByLibrary.simpleMessage("Rebre un compte"),
    "receiveButton" : MessageLookupByLibrary.simpleMessage("Rebre"),
    "receivedHeader" : MessageLookupByLibrary.simpleMessage("Rebut"),
    "receivingAccountOPDetails" : MessageLookupByLibrary.simpleMessage("Compte de recepció"),
    "receivingAccountTextFieldHeader" : MessageLookupByLibrary.simpleMessage("Compte de recepció"),
    "recoverFundsOPDetails" : MessageLookupByLibrary.simpleMessage("Recuperació de fons (% 1)"),
    "removedFromContactsParagraph" : MessageLookupByLibrary.simpleMessage("S\'ha eliminat% 1 dels contactes"),
    "requestButton" : MessageLookupByLibrary.simpleMessage("Sol·licitud"),
    "requestSheetHeader" : MessageLookupByLibrary.simpleMessage("Sol·licitud"),
    "scanQRCodeButton" : MessageLookupByLibrary.simpleMessage("Escaneig del codi QR"),
    "searchAccountNameButton" : MessageLookupByLibrary.simpleMessage("Cerca el nom del compte"),
    "searchForNameButton" : MessageLookupByLibrary.simpleMessage("Buscar nom"),
    "searchNameButton" : MessageLookupByLibrary.simpleMessage("Nom de la cerca"),
    "securityFirstHeader" : MessageLookupByLibrary.simpleMessage("Seguretat primer!"),
    "securityHeader" : MessageLookupByLibrary.simpleMessage("Seguretat"),
    "sellerAccountOPDetails" : MessageLookupByLibrary.simpleMessage("Compte del venedor"),
    "sendAmountOPDetails" : MessageLookupByLibrary.simpleMessage("Enviar import"),
    "sendButton" : MessageLookupByLibrary.simpleMessage("Enviar"),
    "sendConfirmationButton" : MessageLookupByLibrary.simpleMessage("Confirmar l\'enviament"),
    "sendSheetHeader" : MessageLookupByLibrary.simpleMessage("Envia"),
    "sendingAccountOPDetails" : MessageLookupByLibrary.simpleMessage("Compte enviant"),
    "sendingConfirmParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu les dades de la transacció a enviar."),
    "sendingSheetHeader" : MessageLookupByLibrary.simpleMessage("S\'està enviant"),
    "sentHeader" : MessageLookupByLibrary.simpleMessage("Enviat"),
    "sentParagraph" : MessageLookupByLibrary.simpleMessage("La transacció s\'ha enviat correctament."),
    "sentSheetHeader" : MessageLookupByLibrary.simpleMessage("Enviat"),
    "setToDefaultButton" : MessageLookupByLibrary.simpleMessage("Establir a valors predeterminats"),
    "settingsHeader" : MessageLookupByLibrary.simpleMessage("Configuració"),
    "shareHeader" : MessageLookupByLibrary.simpleMessage("Comparteix Blaise"),
    "showButton" : MessageLookupByLibrary.simpleMessage("Mostra"),
    "signeraccountOPDetails" : MessageLookupByLibrary.simpleMessage("signer_account"),
    "somethingWentWrongError" : MessageLookupByLibrary.simpleMessage("Alguna cosa ha anat malament. Si us plau torna-ho a intentar després"),
    "successfullyImportedContactsParagraph" : MessageLookupByLibrary.simpleMessage("% 1 contactes importats amb èxit"),
    "systemDefaultHeader" : MessageLookupByLibrary.simpleMessage("Predeterminat del sistema"),
    "themeCopperHeader" : MessageLookupByLibrary.simpleMessage("Coure"),
    "themeDarkHeader" : MessageLookupByLibrary.simpleMessage("Fosc"),
    "themeHeader" : MessageLookupByLibrary.simpleMessage("Tema"),
    "themeLightHeader" : MessageLookupByLibrary.simpleMessage("Llum"),
    "threeCharacterNameError" : MessageLookupByLibrary.simpleMessage("Ha de tenir com a mínim 3 caràcters"),
    "timeOPDetails" : MessageLookupByLibrary.simpleMessage("temps"),
    "totalBalanceHeader" : MessageLookupByLibrary.simpleMessage("Saldo total"),
    "transactionOPDetails" : MessageLookupByLibrary.simpleMessage("Transacció (% 1)"),
    "transferAccountHeader" : MessageLookupByLibrary.simpleMessage("Compte de transferència"),
    "transferButton" : MessageLookupByLibrary.simpleMessage("Transferència"),
    "transferParagraph" : MessageLookupByLibrary.simpleMessage("Introduïu una clau pública a continuació per transferir-hi la propietat d’aquest compte."),
    "transferSheetHeader" : MessageLookupByLibrary.simpleMessage("Transferència"),
    "transferredHeader" : MessageLookupByLibrary.simpleMessage("Traspassat"),
    "transferredParagraph" : MessageLookupByLibrary.simpleMessage("El vostre compte s\'ha transferit correctament a la clau pública següent."),
    "transferredSheetHeader" : MessageLookupByLibrary.simpleMessage("Traspassat"),
    "transferringParagraph" : MessageLookupByLibrary.simpleMessage("Confirmeu la clau pública següent per transferir-hi la propietat d’aquest compte."),
    "transferringSheetHeader" : MessageLookupByLibrary.simpleMessage("Transferència"),
    "unconfirmedAccountHeader" : MessageLookupByLibrary.simpleMessage("Compte no confirmat"),
    "unconfirmedAccountParagraph" : MessageLookupByLibrary.simpleMessage("Aquest és un <colored> compte no confirmat </colored>. S\'ha transferit a tu, però abans de poder utilitzar-lo cal que existeixi una confirmació de xarxa. Generalment triguen uns 5 minuts, un cop finalitzat, podreu utilitzar aquest compte."),
    "undefinedHeader" : MessageLookupByLibrary.simpleMessage("Indefinit"),
    "unencryptedKeyButton" : MessageLookupByLibrary.simpleMessage("Clau no xifrada"),
    "uninstallDisclaimerParagraph" : MessageLookupByLibrary.simpleMessage("Si perdeu el dispositiu o desinstalgeu Blaise Wallet, necessitareu la clau privada per recuperar els vostres fons."),
    "unknownOPDetails" : MessageLookupByLibrary.simpleMessage("Desconegut (% 1)"),
    "unlockButton" : MessageLookupByLibrary.simpleMessage("Desbloquejar"),
    "unlockWithBiometricsButton" : MessageLookupByLibrary.simpleMessage("Desbloquejar amb Biometrics"),
    "unlockWithPINButton" : MessageLookupByLibrary.simpleMessage("Desbloquegeu amb el PIN"),
    "urlChangedToParagraph" : MessageLookupByLibrary.simpleMessage("L\'URL s\'ha canviat a% 1"),
    "viewPublicKeyHeader" : MessageLookupByLibrary.simpleMessage("Veure clau pública"),
    "warningHeader" : MessageLookupByLibrary.simpleMessage("Avís"),
    "welcomeParagraph" : MessageLookupByLibrary.simpleMessage("Benvingut a la cartera Blaise. Per començar, podeu crear una clau privada o importar-ne una."),
    "yesAddFeeButton" : MessageLookupByLibrary.simpleMessage("Sí, afegeix comissió"),
    "yesHeader" : MessageLookupByLibrary.simpleMessage("Sí"),
    "yesImSureButton" : MessageLookupByLibrary.simpleMessage("Sí, n\'estic segur"),
    "zeroAmountError" : MessageLookupByLibrary.simpleMessage("La quantitat no pot ser 0"),
    "zeroPriceError" : MessageLookupByLibrary.simpleMessage("El preu no pot ser 0")
  };
}


<|start_filename|>test/json_rpc/model/request/findaccounts_request_test.dart<|end_filename|>
import 'dart:convert';

import 'package:pascaldart/json_rpc.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  group('json_rpc.model.request.findaccounts_request', () {
    test('can serialize findaccounts', () {
      FindAccountsRequest request =
          FindAccountsRequest(name: 'bbedward', exact: true);
      expect(json.encode(request.toJson()),
          '{"jsonrpc":"2.0","method":"findaccounts","id":0,"params":{"name":"bbedward","exact":true}}');
    });
  });
}


<|start_filename|>lib/util/sharedprefs_util.dart<|end_filename|>
import 'dart:convert';
import 'dart:io';
import 'dart:ui';

import 'package:blaise_wallet_flutter/constants.dart';
import 'package:blaise_wallet_flutter/model/authentication_method.dart';
import 'package:blaise_wallet_flutter/model/available_currency.dart';
import 'package:blaise_wallet_flutter/model/available_languages.dart';
import 'package:blaise_wallet_flutter/model/available_themes.dart';
import 'package:blaise_wallet_flutter/model/lock_timeout.dart';
import 'package:intl/intl.dart';
import 'package:pascaldart/pascaldart.dart';
import 'package:shared_preferences/shared_preferences.dart';

/// Singleton wrapper for shared preferences
class SharedPrefsUtil {
  // Keys
  static const String first_launch_key = 'pasc_first_launch';
  static const String privkey_backed_up_key = 'pasc_privkey_backedup';
  static const String rpc_url_key = 'pasc_rpc_url';
  static const String cur_theme = 'blaise_cur_theme_key';
  // For maximum pin attempts
  static const String pin_attempts = 'blaise_pin_attempts';
  static const String pin_lock_until = 'blaise_lock_duraton';
  // Lock screen
  static const String lock_app = 'app_lock_screen';
  static const String app_lock_timeout = 'app_lock_timeout';
  // Using biometrics
  static const String auth_method = 'blaise_auth_method';
  // Donation contact has been added
  static const String firstcontact_added = 'blaise_first_c_added';
  // Caching price API response
  static const String price_api_cache = 'price_api_cache_v1';
  // Local currency
  static const String cur_currency = 'blaise_currency_pref';
  // Language setting
  static const String cur_language = 'blaise_lang_pref';
  // UUID for our WS subscription
  static const String app_uuid_key = 'blaise_app_uuid';
  // Push notifications
  static const String notification_enabled = 'blaise_notification_on';
  // Freepasa account before confirmation
  static const String freepasa_account_pending = 'blaise_fpasa_pending_acct';
  // For certain keystore incompatible androids
  static const String use_legacy_storage = 'blaise_legacy_storage';

  // For plain-text data
  Future<void> set(String key, dynamic value) async {
    SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
    if (value is bool) {
      sharedPreferences.setBool(key, value);
    } else if (value is String) {
      sharedPreferences.setString(key, value);
    } else if (value is double) {
      sharedPreferences.setDouble(key, value);
    } else if (value is int) {
      sharedPreferences.setInt(key, value);
    }
  }

  Future<dynamic> get(String key, {dynamic defaultValue}) async {
    SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
    return await sharedPreferences.get(key) ?? defaultValue;
  }

  /// Set a key with an expiry, expiry is in seconds
  Future<void> setWithExpiry(String key, dynamic value, int expiry) async {
    DateTime now = DateTime.now().toUtc();
    DateTime expired = now.add(Duration(seconds: expiry));
    Map<String, dynamic> msg = {
      'data':value,
      'expiry':expired.millisecondsSinceEpoch
    };
    String serialized = json.encode(msg);
    await set(key, serialized);
  }

  /// Get a key that has an expiry
  Future<dynamic> getWithExpiry(String key) async {
    String val = await get(key, defaultValue: null);
    if (val == null) {
      return null;
    }
    Map<String, dynamic> msg = json.decode(val);
    DateTime expired = DateTime.fromMillisecondsSinceEpoch(msg['expiry']);
    if (DateTime.now().toUtc().difference(expired).inMinutes > 0) {
      await remove(key);
      return null;
    }
    return msg['data'];
  }

  Future<void> remove(String key) async {
    SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
    return await sharedPreferences.remove(key);
  }

  // Key-specific helpers
  Future<void> setPrivateKeyBackedUp(bool value) async {
    return await set(privkey_backed_up_key, value);
  }

  Future<bool> getPrivateKeyBackedUp() async {
    return await get(privkey_backed_up_key, defaultValue: false);
  }

  Future<void> setFirstLaunch() async {
    return await set(first_launch_key, false);
  }

  Future<bool> getFirstLaunch() async {
    return await get(first_launch_key, defaultValue: true);
  }

  Future<void> setRpcUrl(String rpcUrl) async {
    return await set(rpc_url_key, rpcUrl);
  }

  Future<void> resetRpcUrl() async {
    return await remove(rpc_url_key);
  }

  Future<String> getRpcUrl() async {
    return await get(rpc_url_key,
        defaultValue: AppConstants.DEFAULT_RPC_HTTP_URL);
  }

  Future<void> setTheme(ThemeSetting theme) async {
   return await set(cur_theme, theme.getIndex());
  }

  Future<ThemeSetting> getTheme() async {
    return ThemeSetting(ThemeOptions.values[await get(cur_theme, defaultValue: ThemeOptions.LIGHT.index)]);
  }

  Future<void> setLock(bool value) async {
    return await set(lock_app, value);
  }

  Future<bool> getLock() async {
    return await get(lock_app, defaultValue: false);
  }

  Future<void> setLockTimeout(LockTimeoutSetting setting) async {
   return await set(app_lock_timeout, setting.getIndex());
  }

  Future<LockTimeoutSetting> getLockTimeout() async {
    return LockTimeoutSetting(LockTimeoutOption.values[await get(app_lock_timeout, defaultValue: LockTimeoutOption.ONE.index)]);
  }

  // Locking out when max pin attempts exceeded
  Future<int> getLockAttempts() async {
    return await get(pin_attempts, defaultValue: 0);
  }

  Future<void> incrementLockAttempts() async {
    await set(pin_attempts, await getLockAttempts() + 1);
  }

  Future<void> resetLockAttempts() async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    await prefs.remove(pin_attempts);
    await prefs.remove(pin_lock_until);
  }

  Future<bool> shouldLock() async {
    if (await get(pin_lock_until) != null || await getLockAttempts() >= 5) {
      return true;
    }
    return false;
  }

  Future<void> updateLockDate() async {
    int attempts = await getLockAttempts();
    if (attempts >= 20) {
      // 4+ failed attempts
      await set(pin_lock_until, DateFormat.yMd().add_jms().format(DateTime.now().toUtc().add(Duration(hours: 24))));
    } else if (attempts >= 15) {
      // 3 failed attempts
      await set(pin_lock_until, DateFormat.yMd().add_jms().format(DateTime.now().toUtc().add(Duration(minutes: 15))));
    } else if (attempts >= 10) {
      // 2 failed attempts
      await set(pin_lock_until, DateFormat.yMd().add_jms().format(DateTime.now().toUtc().add(Duration(minutes: 5))));
    } else if (attempts >= 5) {
      await set(pin_lock_until, DateFormat.yMd().add_jms().format(DateTime.now().toUtc().add(Duration(minutes: 1))));
    }
  }

  Future<DateTime> getLockDate() async {
    String lockDateStr = await get(pin_lock_until);
    if (lockDateStr == null) {
      return null;
    }
    return DateFormat.yMd().add_jms().parseUtc(lockDateStr);
  }

  Future<void> setAuthMethod(AuthenticationMethod method) async {
   return await set(auth_method, method.getIndex());
  }

  Future<AuthenticationMethod> getAuthMethod() async {
    return AuthenticationMethod(AuthMethod.values[await get(auth_method, defaultValue: AuthMethod.BIOMETRICS.index)]);
  }

  Future<void> setFirstContactAdded(bool value) async {
    return await set(firstcontact_added, value);
  }

  Future<bool> getFirstContactAdded() async {
    return await get(firstcontact_added, defaultValue: false);
  }

  Future<String> getPriceAPICache() async {
    return await get(price_api_cache, defaultValue: null);
  }

  Future<void> setPriceAPICache(String data) async {
    await set(price_api_cache, data);
  }

  Future<void> setCurrency(AvailableCurrency currency) async {
   return await set(cur_currency, currency.getIndex());
  }

  Future<AvailableCurrency> getCurrency(Locale deviceLocale) async {
    return AvailableCurrency(AvailableCurrencyEnum.values[await get(cur_currency, defaultValue: AvailableCurrency.getBestForLocale(deviceLocale).currency.index)]);
  }

  Future<void> setLanguage(LanguageSetting language) async {
   return await set(cur_language, language.getId());
  }

  Future<LanguageSetting> getLanguage() async {
    String langEnumStr = await get(cur_language, defaultValue: AvailableLanguage.DEFAULT.toString());
    AvailableLanguage lang;
    for (AvailableLanguage aLang in AvailableLanguage.values) {
      if (aLang.toString() == langEnumStr) {
        lang = aLang;
        break;
      }
    }
    return LanguageSetting(lang);
  }


  Future<void> setUuid(String uuid) async {
    return await set(app_uuid_key, uuid);
  }

  Future<String> getUuid() async {
    return await get(app_uuid_key);
  }

  Future<void> setNotificationsOn(bool value) async {
    return await set(notification_enabled, value);
  }

  Future<bool> getNotificationsOn() async {
    // Notifications off by default on iOS, 
    bool defaultValue = Platform.isIOS ? false : true;
    return await get(notification_enabled, defaultValue: defaultValue);
  }

  /// If notifications have been set by user/app
  Future<bool> getNotificationsSet() async {
    return await get(notification_enabled, defaultValue: null) == null ? false : true;
  }

  Future<AccountNumber> getFreepasaAccount() async {
    int acct = await getWithExpiry(freepasa_account_pending);
    return acct == null ? null : AccountNumber.fromInt(acct);
  }

  Future<void> setFreepasaAccount(AccountNumber account) async {
    await setWithExpiry(freepasa_account_pending, account.account, 2000);
  }

  Future<bool> useLegacyStorage() async {
    return await get(use_legacy_storage, defaultValue: false);
  }

  Future<void> setUseLegacyStorage() async {
    await set(use_legacy_storage, true);
  }

  // For logging out
  Future<void> deleteAll({bool firstLaunch = false}) async {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    if (firstLaunch) {
      await prefs.clear();
    } else {
      await prefs.remove(privkey_backed_up_key);
      await prefs.remove(rpc_url_key);
      await prefs.remove(pin_attempts);
      await prefs.remove(pin_lock_until);
      await prefs.remove(auth_method);
      await prefs.remove(app_lock_timeout);
      await prefs.remove(lock_app);
      await prefs.remove(cur_currency);
      await prefs.remove(app_uuid_key);
      await prefs.remove(use_legacy_storage);
    }
  }
}


<|start_filename|>lib/network/model/request_item.dart<|end_filename|>
import 'dart:convert';

/// Top-level function for running in isolate via flutter compute function
String encodeRequestItem(dynamic request) {
  return json.encode(request.toJson());
}

class RequestItem<T> {
  // After this time a request will expire
  static const int EXPIRE_TIME_S = 15;

  DateTime expireDt;
  bool isProcessing;
  T request;

  RequestItem(T request) {
    this.expireDt = DateTime.now().add(new Duration(seconds: EXPIRE_TIME_S));
    this.isProcessing = false;
    this.request = request;
  }
}

<|start_filename|>android/app/src/main/java/com/appditto/blaise/Vault.java<|end_filename|>
package com.appditto.blaise;

import android.content.Context;

import com.bottlerocketstudios.vault.SharedPreferenceVault;
import com.bottlerocketstudios.vault.SharedPreferenceVaultFactory;
import com.bottlerocketstudios.vault.SharedPreferenceVaultRegistry;

import java.security.GeneralSecurityException;
import java.security.SecureRandom;

public class Vault {
    public static final String ENCRYPTION_KEY_NAME = "key";
    private static final String TAG = Vault.class.getSimpleName();
    private static final String AUTOMATICALLY_KEYED_PREF_FILE_NAME = "com.appditto.blaise.automaticallyKeyedPref";
    private static final String AUTOMATICALLY_KEYED_KEY_FILE_NAME = "com.appditto.blaise.automaticallyKeyedKey";
    private static final String AUTOMATICALLY_KEYED_KEY_ALIAS = "com.appditto.blaise.automaticallyKeyed";
    private static final int AUTOMATICALLY_KEYED_KEY_INDEX = 3;
    private static final String AUTOMATICALLY_KEYED_PRESHARED_SECRET = "<KEY>";

    public static boolean initializeVault(Context context) {
        try {
            initKeyedVault(context);
            return true;
        } catch (GeneralSecurityException e) {
        }
        return false;
    }

    /**
     * Create a vault that will automatically key itself initially with a random key.
     */
    private static void initKeyedVault(Context context) throws GeneralSecurityException {
        SharedPreferenceVault sharedPreferenceVault = SharedPreferenceVaultFactory
                .getAppKeyedCompatAes256Vault(
                        context,
                        AUTOMATICALLY_KEYED_PREF_FILE_NAME,
                        AUTOMATICALLY_KEYED_KEY_FILE_NAME,
                        AUTOMATICALLY_KEYED_KEY_ALIAS,
                        AUTOMATICALLY_KEYED_KEY_INDEX,
                        AUTOMATICALLY_KEYED_PRESHARED_SECRET
                );
        SharedPreferenceVaultRegistry
                .getInstance()
                .addVault(
                        AUTOMATICALLY_KEYED_KEY_INDEX,
                        AUTOMATICALLY_KEYED_PREF_FILE_NAME,
                        AUTOMATICALLY_KEYED_KEY_ALIAS,
                        sharedPreferenceVault
                );
    }

    /**
     * Encapsulates index knowledge.
     */
    public static SharedPreferenceVault getVault() {
        return SharedPreferenceVaultRegistry.getInstance().getVault(AUTOMATICALLY_KEYED_KEY_INDEX);
    }

    /**
     * Generate a secret key for use with encryption / decryption
     */
    public static byte[] generateKey() {
        byte[] key = new byte[64];
        new SecureRandom().nextBytes(key);
        return key;
    }

}

<|start_filename|>lib/util/salsa20crypt.dart<|end_filename|>
import 'dart:typed_data';

import 'package:pascaldart/pascaldart.dart';
import 'package:pointycastle/api.dart' show ParametersWithIV, KeyParameter;
import 'package:pointycastle/stream/salsa20.dart';

/**
 * Encryption using Salsa20 from pointycastle
 */
class Salsa20Crypt {
  final String key;
  final String iv;
  final ParametersWithIV<KeyParameter> _params;
  final Salsa20Engine _cipher = Salsa20Engine();

  Salsa20Crypt(this.key, this.iv)
      : _params = ParametersWithIV<KeyParameter>(
            KeyParameter(Uint8List.fromList(key.codeUnits)),
            Uint8List.fromList(iv.codeUnits));

  String encrypt(String plainText) {
    _cipher
      ..reset()
      ..init(true, _params);

    final input = Uint8List.fromList(plainText.codeUnits);
    final output = _cipher.process(input);

    return PDUtil.byteToHex(output);
  }

  String decrypt(String cipherText) {
    _cipher
      ..reset()
      ..init(false, _params);

    final input = PDUtil.hexToBytes(cipherText);
    final output = _cipher.process(input);

    return String.fromCharCodes(output);
  }
}

<|start_filename|>lib/ui/widgets/overlay_dialog.dart<|end_filename|>
import 'dart:ui';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/app_text_field.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:flutter/material.dart';

/// An overlay that supports a list of options as well as text/confirm actions
class DialogOverlay extends StatefulWidget {
  final String title;
  final List<DialogListItem> optionsList;
  final bool warningStyle;
  final TextSpan body;
  final String confirmButtonText;
  final Function onConfirm;
  final bool feeDialog;
  final bool singleButton;

  DialogOverlay(
      {this.title,
      this.optionsList,
      this.body,
      this.confirmButtonText,
      this.onConfirm,
      this.warningStyle = false,
      this.singleButton = false,
      this.feeDialog = false});

  @override
  State<StatefulWidget> createState() => _DialogOverlayState();
}

class _DialogOverlayState extends State<DialogOverlay>
    with SingleTickerProviderStateMixin {
  AnimationController _controller;
  Animation<double> _scaleAnimation;
  Animation<double> _opacityAnimation;

  @override
  void initState() {
    super.initState();

    _controller =
        AnimationController(vsync: this, duration: Duration(milliseconds: 200));
    _scaleAnimation = Tween(begin: 0.75, end: 1.0).animate(
        CurvedAnimation(parent: _controller, curve: Curves.decelerate));
    _opacityAnimation = Tween(begin: 0.25, end: 1.0).animate(
        CurvedAnimation(parent: _controller, curve: Curves.decelerate));
    _controller.addListener(() {
      setState(() {});
    });

    _controller.forward();
  }

  @override
  void dispose() {
    _controller?.dispose();
    super.dispose();
  }

  Widget buildListItems(List<DialogListItem> optionsList) {
    List<Widget> widgets = [];
    for (var option in optionsList) {
      widgets.add(
        // Single Option
        Container(
          width: double.maxFinite,
          height: 50,
          child: FlatButton(
              onPressed: () {
                if (option.action == null || option.disabled) {
                  return;
                }
                option.action();
              },
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(0),
              ),
              padding: EdgeInsets.all(0),
              child: Container(
                alignment: Alignment(-1, 0),
                margin: EdgeInsetsDirectional.only(start: 24, end: 24),
                child: AutoSizeText(
                  option.option,
                  style: option.disabled
                      ? AppStyles.paragraphBigDisabled(context)
                      : AppStyles.paragraphBig(context),
                  textAlign: TextAlign.start,
                  maxLines: 1,
                  stepGranularity: 0.1,
                ),
              )),
        ),
      );
    }
    return Column(children: widgets);
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Material(
        color: Colors.transparent,
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
          child: FadeTransition(
            opacity: _opacityAnimation,
            child: ScaleTransition(
              scale: _scaleAnimation,
              child: Container(
                margin: EdgeInsetsDirectional.only(start: 20, end: 20),
                constraints: BoxConstraints(
                  maxHeight: MediaQuery.of(context).size.height * 0.8,
                  maxWidth: 280,
                ),
                decoration: BoxDecoration(
                  color: StateContainer.of(context).curTheme.backgroundPrimary,
                  borderRadius: BorderRadius.circular(12),
                  boxShadow: [
                    BoxShadow(
                      color: StateContainer.of(context).curTheme.shadow50,
                      offset: Offset(0, 30),
                      blurRadius: 60,
                      spreadRadius: -10,
                    ),
                  ],
                ),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(12),
                  child: Column(
                    mainAxisSize: MainAxisSize.min,
                    children: <Widget>[
                      Container(
                        width: double.maxFinite,
                        decoration: BoxDecoration(
                          gradient: widget.warningStyle
                              ? null
                              : StateContainer.of(context)
                                  .curTheme
                                  .gradientPrimary,
                          color: widget.warningStyle
                              ? StateContainer.of(context).curTheme.danger
                              : null,
                          borderRadius: BorderRadius.only(
                              topLeft: Radius.circular(12),
                              topRight: Radius.circular(12)),
                        ),
                        child: Container(
                          margin:
                              EdgeInsetsDirectional.fromSTEB(24, 16, 24, 16),
                          child: AutoSizeText(
                            widget.title,
                            style: AppStyles.modalHeader(context),
                            maxLines: 1,
                            stepGranularity: 0.1,
                          ),
                        ),
                      ),
                      // Options container
                      widget.body != null
                          ? Column(
                              children: <Widget>[
                                Container(
                                  margin: EdgeInsetsDirectional.fromSTEB(
                                      24, 16, 24, 16),
                                  child: Column(
                                    children: <Widget>[
                                      AutoSizeText.rich(
                                        widget.body,
                                        stepGranularity: 0.1,
                                        maxLines: 8,
                                        minFontSize: 8,
                                      )
                                    ],
                                  ),
                                ),
                                Row(
                                  children: <Widget>[
                                    AppButton(
                                      type: widget.feeDialog || widget.singleButton
                                          ? AppButtonType.Primary
                                          : AppButtonType.Danger,
                                      text: widget.confirmButtonText,
                                      buttonTop: widget.singleButton?false:true,
                                      onPressed: () {
                                        if (widget.onConfirm != null) {
                                          widget.onConfirm();
                                        }
                                      },
                                    ),
                                  ],
                                ),
                                !widget.singleButton? Row(
                                  children: <Widget>[
                                    AppButton(
                                      type: widget.feeDialog
                                          ? AppButtonType.PrimaryOutline
                                          : AppButtonType.DangerOutline,
                                      text: toUppercase(AppLocalization.of(context).cancelButton, context),
                                      onPressed: () {
                                        Navigator.of(context).pop();
                                      },
                                    ),
                                  ],
                                ):SizedBox(),
                              ],
                            )
                          : Container(
                              constraints: BoxConstraints(
                                  maxHeight:
                                      MediaQuery.of(context).size.height * 0.6 -
                                          60,
                                  minHeight: 0),
                              // Options list
                              child: SingleChildScrollView(
                                padding: EdgeInsetsDirectional.only(
                                    top: 8, bottom: 8),
                                child: buildListItems(widget.optionsList),
                              ),
                            ),
                    ],
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

class DialogListItem {
  final String option;
  final Function action;
  final bool disabled;
  DialogListItem({@required this.option, this.action, this.disabled = false});
}

/// Modified dialog function from flutter source. Modified for the backdrop blur effect

Widget _buildMaterialDialogTransitions(
    BuildContext context,
    Animation<double> animation,
    Animation<double> secondaryAnimation,
    Widget child) {
  return FadeTransition(
    opacity: CurvedAnimation(
      parent: animation,
      curve: Curves.easeOut,
    ),
    child: child,
  );
}

Future<T> showAppDialog<T>({
  @required
      BuildContext context,
  bool barrierDismissible = true,
  @Deprecated(
      'Instead of using the "child" argument, return the child from a closure '
      'provided to the "builder" argument. This will ensure that the BuildContext '
      'is appropriate for widgets built in the dialog.')
      Widget child,
  WidgetBuilder builder,
}) {
  assert(child == null || builder == null);
  assert(debugCheckHasMaterialLocalizations(context));

  final ThemeData theme = Theme.of(context, shadowThemeOnly: true);
  return showGeneralDialog(
    context: context,
    pageBuilder: (BuildContext buildContext, Animation<double> animation,
        Animation<double> secondaryAnimation) {
      final Widget pageChild = child ?? Builder(builder: builder);
      return SafeArea(
        child: Builder(builder: (BuildContext context) {
          return theme != null
              ? Theme(data: theme, child: pageChild)
              : pageChild;
        }),
      );
    },
    barrierDismissible: barrierDismissible,
    barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
    barrierColor: StateContainer.of(context).curTheme.overlay10,
    transitionDuration: const Duration(milliseconds: 0),
    transitionBuilder: _buildMaterialDialogTransitions,
  );
}


<|start_filename|>lib/ui/settings/backup_private_key/backup_private_key_sheet.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/settings/backup_private_key/encrypt_private_key_sheet.dart';
import 'package:blaise_wallet_flutter/ui/settings/backup_private_key/unencrypted_private_key_sheet.dart';
import 'package:blaise_wallet_flutter/ui/util/app_icons.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/pin_screen.dart';
import 'package:blaise_wallet_flutter/ui/widgets/sheets.dart';
import 'package:blaise_wallet_flutter/util/authentication.dart';
import 'package:blaise_wallet_flutter/util/haptic_util.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';

class BackupPrivateKeySheet extends StatefulWidget {
  _BackupPrivateKeySheetState createState() => _BackupPrivateKeySheetState();
}

class _BackupPrivateKeySheetState extends State<BackupPrivateKeySheet> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Expanded(
          child: Container(
            decoration: BoxDecoration(
              color: StateContainer.of(context).curTheme.backgroundPrimary,
              borderRadius: BorderRadius.only(
                topLeft: Radius.circular(12),
                topRight: Radius.circular(12),
              ),
            ),
            child: Column(
              children: <Widget>[
                // Sheet header
                Container(
                  height: 60,
                  width: double.maxFinite,
                  decoration: BoxDecoration(
                    gradient:
                        StateContainer.of(context).curTheme.gradientPrimary,
                    borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(12),
                      topRight: Radius.circular(12),
                    ),
                  ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      // Close Button
                      Container(
                        margin: EdgeInsetsDirectional.only(start: 5, end: 10),
                        height: 50,
                        width: 50,
                        child: FlatButton(
                            highlightColor:
                                StateContainer.of(context).curTheme.textLight15,
                            splashColor:
                                StateContainer.of(context).curTheme.textLight30,
                            onPressed: () {
                              Navigator.of(context).pop();
                            },
                            shape: RoundedRectangleBorder(
                                borderRadius: BorderRadius.circular(50.0)),
                            padding: EdgeInsets.all(0.0),
                            child: Icon(AppIcons.close,
                                color: StateContainer.of(context)
                                    .curTheme
                                    .textLight,
                                size: 20)),
                      ),
                      // Header
                      Container(
                        width: MediaQuery.of(context).size.width - 130,
                        alignment: Alignment(0, 0),
                        child: AutoSizeText(
                          toUppercase(AppLocalization.of(context)
                              .privateKeySheetHeader
                              ,context),
                          style: AppStyles.header(context),
                          maxLines: 1,
                          stepGranularity: 0.1,
                          textAlign: TextAlign.center,
                        ),
                      ),
                      // Sized Box
                      SizedBox(
                        height: 50,
                        width: 65,
                      ),
                    ],
                  ),
                ),
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      // Paragraph
                      Container(
                        margin: EdgeInsetsDirectional.fromSTEB(30, 30, 30, 0),
                        child: AutoSizeText.rich(
                          TextSpan(
                            children: [
                              TextSpan(
                                text: AppLocalization.of(context)
                                        .backupKeyFirstParagraph +
                                    "\n\n",
                                style: AppStyles.paragraph(context),
                              ),
                              TextSpan(
                                text: AppLocalization.of(context)
                                        .backupKeySecondParagraph +
                                    "\n\n",
                                style: AppStyles.paragraphPrimary(context),
                              ),
                              TextSpan(
                                text: AppLocalization.of(context)
                                        .backupKeyThirdParagraph +
                                    "\n\n",
                                style: AppStyles.paragraphPrimary(context),
                              ),
                              TextSpan(
                                text: AppLocalization.of(context)
                                    .backupKeyFourthParagraph,
                                style: AppStyles.paragraph(context),
                              ),
                            ],
                          ),
                          stepGranularity: 0.5,
                          maxLines: 14,
                          minFontSize: 8,
                          style: TextStyle(fontSize: 14),
                        ),
                      ),
                    ],
                  ),
                ),
                //"Encrypted Key" and "Unencrypted Key" buttons
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.Primary,
                      text: AppLocalization.of(context).encryptedKeyButton,
                      buttonTop: true,
                      onPressed: () async {
                        await authenticate(true);
                      },
                    ),
                  ],
                ),
                // "Close" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.PrimaryOutline,
                      text: AppLocalization.of(context).unencryptedKeyButton,
                      onPressed: () async {
                        await authenticate(false);
                      },
                    ),
                  ],
                ),
              ],
            ),
          ),
        ),
      ],
    );
  }

  Future<void> _authenticateBiometrics(AuthUtil authUtil, String message, bool encrypted) async {
    bool authenticated = await authUtil.authenticateWithBiometrics(message);
    if (authenticated) {
      HapticUtil.fingerprintSucess();
      Navigator.of(context).pop();
      if (encrypted) {
        AppSheets.showBottomSheet(
            context: context, widget: EncryptPrivateKeySheet());
      } else {
        AppSheets.showBottomSheet(
            context: context, widget: UnencryptedPrivateKeySheet());
      }
    }    
  }

  Future<void> _authenticatePin(bool encrypted, String message) async {
    String expectedPin = await sl.get<Vault>().getPin();
    await Navigator.of(context).push(MaterialPageRoute(
      builder: (BuildContext context) {
        return PinScreen(
          type: PinOverlayType.ENTER_PIN,
          onSuccess: (pin) {
            Navigator.of(context).pop();
            Navigator.of(context).pop();
            if (encrypted) {
              AppSheets.showBottomSheet(
                  context: context, widget: EncryptPrivateKeySheet());
            } else {
              AppSheets.showBottomSheet(
                  context: context, widget: UnencryptedPrivateKeySheet());
            }
          },
          expectedPin: expectedPin,
          description: message,
        );
      },
    ));    
  }

  Future<void> authenticate(bool encrypted) async {
    String message = AppLocalization.of(context).authenticateToBackUpParagraph;
    // Authenticate
    AuthUtil authUtil = AuthUtil();
    if (await authUtil.useBiometrics()) {
      // Biometric auth
      try {
        await _authenticateBiometrics(authUtil, message, encrypted);
      } catch (e) {
        await _authenticatePin(encrypted, message);
      }
    } else {
      await _authenticatePin(encrypted, message);
    }
  }
}


<|start_filename|>lib/util/vault.dart<|end_filename|>
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/util/salsa20crypt.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:flutter/services.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:pascaldart/common.dart';
import 'package:shared_preferences/shared_preferences.dart';

/// Secure store implementation that stores sensitive data
class Vault {
  static const String PRIVATEKEY_KEY = 'pascal_privatekey';
  static const String PIN_KEY = 'blaise_pin';

  FlutterSecureStorage _secureStorage;
  PrivateKeyCoder _privateKeyCoder;

  Future<bool> legacy() async {
    return await sl.get<SharedPrefsUtil>().useLegacyStorage();
  }

  Vault() {
    this._secureStorage = FlutterSecureStorage();
    this._privateKeyCoder = PrivateKeyCoder();
  }

  // Generic write/read
  Future<String> _write(String key, String value) async {
    if (await legacy()) {
      await setEncrypted(key, value);
    } else {
      await _secureStorage.write(key:key, value:value);
    }
    return value;
  }

  Future<String> _read(String key, {String defaultValue}) async {
    if (await legacy()) {
      return await getEncrypted(key);
    }
    return await _secureStorage.read(key:key) ?? defaultValue;
  }

  // Private key
  Future<String> getPrivateKey() async {
    return await _read(PRIVATEKEY_KEY);
  }

  Future<String> setPrivateKey(PrivateKey privateKey) async {
    return await _write(PRIVATEKEY_KEY,  _privateKeyCoder.encodeToHex(privateKey));
  }

  // Pin
  Future<String> getPin() async {
    return await _read(PIN_KEY);
  }

  Future<String> setPin(String pin) async {
    return await _write(PIN_KEY, pin);
  }

  Future<void> deleteAll() async {
    if (await legacy()) {
      SharedPreferences prefs = await SharedPreferences.getInstance();
      await prefs.remove(PIN_KEY);
      await prefs.remove(PRIVATEKEY_KEY);
      return;
    }
    await _secureStorage.deleteAll();
  }

  // For encrypted data
  Future<void> setEncrypted(String key, String value) async {
    String secret = await getSecret();
    if (secret == null) return null;
    // Decrypt and return
    Salsa20Crypt encrypter = Salsa20Crypt(secret.substring(0, secret.length - 8), secret.substring(secret.length - 8));
    // Encrypt and save
    SharedPreferences prefs = await SharedPreferences.getInstance();
    prefs.setString(key, encrypter.encrypt(value));
  }

  Future<String> getEncrypted(String key) async {
    String secret = await getSecret();
    if (secret == null) return null;
    // Decrypt and return
    Salsa20Crypt encrypter = Salsa20Crypt(secret.substring(0, secret.length - 8), secret.substring(secret.length - 8));
    SharedPreferences prefs = await SharedPreferences.getInstance();
    String encrypted = prefs.get(key);
    if (encrypted == null) return null;
    return encrypter.decrypt(encrypted);
  }

  static const _channel = const MethodChannel('fappchannel');

  static Future<String> getSecret() async {
    return await _channel.invokeMethod('getSecret');
  }
}

<|start_filename|>lib/network/model/request/fcm_delete_account_request.g.dart<|end_filename|>
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'fcm_delete_account_request.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

FcmDeleteAccountRequest _$FcmDeleteAccountRequestFromJson(
    Map<String, dynamic> json) {
  return FcmDeleteAccountRequest(
    account: json['account'] as int,
    fcmToken: json['fcm_token'] as String,
  )..action = json['action'] as String;
}

Map<String, dynamic> _$FcmDeleteAccountRequestToJson(
    FcmDeleteAccountRequest instance) {
  final val = <String, dynamic>{
    'action': instance.action,
  };

  void writeNotNull(String key, dynamic value) {
    if (value != null) {
      val[key] = value;
    }
  }

  writeNotNull('account', instance.account);
  writeNotNull('fcm_token', instance.fcmToken);
  return val;
}


<|start_filename|>lib/ui/intro/intro_backup_confirm.dart<|end_filename|>
import 'package:auto_size_text/auto_size_text.dart';
import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/service_locator.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/buttons.dart';
import 'package:blaise_wallet_flutter/ui/widgets/pin_screen.dart';
import 'package:blaise_wallet_flutter/ui/widgets/svg_repaint.dart';
import 'package:blaise_wallet_flutter/util/sharedprefs_util.dart';
import 'package:blaise_wallet_flutter/util/ui_util.dart';
import 'package:blaise_wallet_flutter/util/vault.dart';
import 'package:flutter/material.dart';

class IntroBackupConfirmPage extends StatefulWidget {
  @override
  _IntroBackupConfirmPageState createState() => _IntroBackupConfirmPageState();
}

class _IntroBackupConfirmPageState extends State<IntroBackupConfirmPage> {
  var _scaffoldKey = GlobalKey<ScaffoldState>();
  @override
  Widget build(BuildContext context) {
    // The main scaffold that holds everything
    return Scaffold(
      resizeToAvoidBottomPadding: false,
      key: _scaffoldKey,
      backgroundColor: StateContainer.of(context).curTheme.backgroundPrimary,
      body: LayoutBuilder(
        builder: (context, constraints) => Column(
              children: <Widget>[
                //A widget that holds welcome animation + paragraph
                Expanded(
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      // Container for the header
                      Container(
                        padding: EdgeInsetsDirectional.only(
                          top: (MediaQuery.of(context).padding.top) +
                              (24 - (MediaQuery.of(context).padding.top) / 2),
                        ),
                        decoration: BoxDecoration(
                          gradient: StateContainer.of(context)
                              .curTheme
                              .gradientPrimary,
                        ),
                        // Row for back button and the header
                        child: Row(
                          children: <Widget>[
                            // The header
                            Container(
                              width: MediaQuery.of(context).size.width - 60,
                              margin: EdgeInsetsDirectional.fromSTEB(
                                  30, 24, 30, 24),
                              child: AutoSizeText(
                                AppLocalization.of(context).backUpKeyHeader,
                                style: AppStyles.header(context),
                                maxLines: 3,
                                stepGranularity: 0.1,
                              ),
                            ),
                          ],
                        ),
                      ),
                      Expanded(
                        child: Column(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: <Widget>[
                            // Container for the illustration
                            Container(
                              child: SvgRepaintAsset(
                                asset: StateContainer.of(context).curTheme.illustrationBackup,
                                width: MediaQuery.of(context).size.width * 0.6,
                                height: MediaQuery.of(context).size.width *
                                    0.6 *
                                    (183 / 230),
                              ),
                            ),
                            //Container for the paragraph
                            Container(
                              alignment: Alignment(-1, 0),
                              margin: EdgeInsetsDirectional.fromSTEB(
                                  30, 30, 30, 12),
                              child: AutoSizeText(
                                AppLocalization.of(context).newKeyBackUpConfirmParagraph,
                                maxLines: 5,
                                stepGranularity: 0.1,
                                style: AppStyles.paragraph(context),
                              ),
                            ),
                          ],
                        ),
                      ),
                    ],
                  ),
                ),

                //"YES, I'M SURE" and "NO, GO BACK" buttons
                // "YES, I'M SURE" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.Primary,
                      text: toUppercase(AppLocalization.of(context).yesImSureButton, context),
                      buttonTop: true,
                      onPressed: () {
                        sl
                            .get<SharedPrefsUtil>()
                            .setPrivateKeyBackedUp(true)
                            .then((_) {
                              Navigator.of(context).push(
                                MaterialPageRoute(
                                  builder: (BuildContext context) {
                                    return PinScreen(
                                      type: PinOverlayType.NEW_PIN,
                                      onSuccess: (pin) {
                                        sl.get<Vault>().setPin(pin).then((_) {
                                          walletState.requestUpdate();
                                          Navigator.of(context).pushNamedAndRemoveUntil(
                                              '/overview', (Route<dynamic> route) => false);                      
                                        });
                                      }
                                    );
                                  }
                                )
                              );
                        });
                      },
                    ),
                  ],
                ),
                // "No, Go Back" button
                Row(
                  children: <Widget>[
                    AppButton(
                      type: AppButtonType.PrimaryOutline,
                      text: toUppercase(AppLocalization.of(context).noGoBackButton, context),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ],
                ),
              ],
            ),
      ),
    );
  }
}


<|start_filename|>lib/util/ui_util.dart<|end_filename|>
import 'dart:async';

import 'package:blaise_wallet_flutter/appstate_container.dart';
import 'package:blaise_wallet_flutter/bus/events.dart';
import 'package:blaise_wallet_flutter/localization.dart';
import 'package:blaise_wallet_flutter/ui/util/text_styles.dart';
import 'package:blaise_wallet_flutter/ui/widgets/overlay_dialog.dart';
import 'package:event_taxi/event_taxi.dart';
import 'package:intl/intl.dart';
import 'package:oktoast/oktoast.dart';
import 'package:flutter/material.dart';

class UIUtil {
  static bool smallScreen(BuildContext context) {
    if (MediaQuery.of(context).size.height < 667)
      return true;
    else
      return false;
  }

  static void showSnackbar(String content, BuildContext context) {
    showToastWidget(
      Align(
        alignment: Alignment.topCenter,
        child: Container(
          margin: EdgeInsets.symmetric(
              vertical: MediaQuery.of(context).size.height * 0.05,
              horizontal: 14),
          padding: EdgeInsets.symmetric(vertical: 18, horizontal: 16),
          width: MediaQuery.of(context).size.width - 30,
          decoration: BoxDecoration(
            color: StateContainer.of(context).curTheme.backgroundPrimary,
            borderRadius: BorderRadius.circular(10),
            boxShadow: [
              BoxShadow(
                  color: StateContainer.of(context).curTheme.overlay20,
                  offset: Offset(0, 20),
                  blurRadius: 40,
                  spreadRadius: -5),
            ],
          ),
          child: Text(
            content,
            style: AppStyles.snackBar(context),
            textAlign: TextAlign.start,
          ),
        ),
      ),
      dismissOtherToast: true,
      duration: Duration(milliseconds: 2000),
    );
  }

  static String formatDateStr(DateTime dt) {
    int currentYear = DateTime.now().toLocal().year;
    DateTime localTime = dt.toLocal();
    DateFormat df;
    if (localTime.year != currentYear) {
      df = DateFormat("MMM dd, yyyy • HH:mm");
    } else {
      df = DateFormat("MMM dd • HH:mm");
    }
    return df.format(localTime);
  }

  static String formatDateStrLong(DateTime dt) {
    //"Jul 08, 2019 • 13:24:01 (1562592241)"
    int secondsSinceEpoch = dt.millisecondsSinceEpoch ~/ 1000;
    DateTime localTime = dt.toLocal();
    DateFormat df;
    df = DateFormat("MMM dd, yyyy • HH:mm:ss");
    return df.format(localTime) + "\n($secondsSinceEpoch)";
  }

  /// Show a dialog asking if they want to confirm a fee
  static void showFeeDialog(
      {@required BuildContext context, @required Function onConfirm}) {
    showAppDialog(
        context: context,
        builder: (_) => DialogOverlay(
            title: AppLocalization.of(context).addFeeHeader,
            feeDialog: true,
            confirmButtonText:
                toUppercase(AppLocalization.of(context).confirmButton, context),
            body: TextSpan(
              children: [
                TextSpan(
                  text: AppLocalization.of(context).feeRequiredParagraph + "\n",
                  style: AppStyles.paragraph(context),
                ),
                TextSpan(
                  text: AppLocalization.of(context)
                      .feeConfirmAmountParagraph
                      .replaceAll("%1", "0.0001"),
                  style: AppStyles.paragraphPrimary(context),
                ),
              ],
            ),
            onConfirm: () {
              onConfirm();
            }));
  }

  static StreamSubscription<dynamic> _lockDisableSub;
  static Future<void> cancelLockEvent() async {
    // Cancel auto-lock event, usually if we are launching another intent
    if (_lockDisableSub != null) {
      _lockDisableSub.cancel();
    }
    EventTaxiImpl.singleton().fire(DisableLockTimeoutEvent(disable: true));
    Future<dynamic> delayed = Future.delayed(Duration(seconds: 10));
    delayed.then((_) {
      return true;
    });
    _lockDisableSub = delayed.asStream().listen((_) {
      EventTaxiImpl.singleton().fire(DisableLockTimeoutEvent(disable: false));
    });
  }
}

List<TextSpan> formatLocalizedColors(BuildContext context, String input) {
  List<TextSpan> ret = [];
  if (!input.contains('<colored>') && !input.contains('</colored>')) {
    ret.add(TextSpan(text: input, style: AppStyles.paragraph(context)));
    return ret;
  }
  int i = 0;
  int iEnd = 0;
  while (input.contains('<colored>') && input.contains('</colored>')) {
    i = input.indexOf('<colored>');
    iEnd = input.indexOf('</colored>');
    ret.add(TextSpan(
        text: input.substring(0, i), style: AppStyles.paragraph(context)));
    ret.add(TextSpan(
        text: input.substring(i + 9, iEnd),
        style: AppStyles.paragraphPrimary(context)));
    input = input.substring(iEnd + 10);
  }
  if (input.length > 0) {
    ret.add(TextSpan(text: input, style: AppStyles.paragraph(context)));
  }
  return ret;
}

List<TextSpan> formatLocalizedColorsDanger(BuildContext context, String input) {
  List<TextSpan> ret = [];
  if (!input.contains('<colored>') && !input.contains('</colored>')) {
    ret.add(TextSpan(text: input, style: AppStyles.paragraph(context)));
    return ret;
  }
  int i = 0;
  int iEnd = 0;
  while (input.contains('<colored>') && input.contains('</colored>')) {
    i = input.indexOf('<colored>');
    iEnd = input.indexOf('</colored>');
    ret.add(TextSpan(
        text: input.substring(0, i), style: AppStyles.paragraph(context)));
    ret.add(TextSpan(
        text: input.substring(i + 9, iEnd),
        style: AppStyles.paragraphDanger(context)));
    input = input.substring(iEnd + 10);
  }
  if (input.length > 0) {
    ret.add(TextSpan(text: input, style: AppStyles.paragraph(context)));
  }
  return ret;
}

String toUppercase(String input, BuildContext context) {
    Locale locale = Locale(StateContainer.of(context).curLanguage.getLocaleString());
    if (locale != null && locale.languageCode == 'tr') {
      input = input.replaceAll("i", "İ");
    } else if (locale != null && locale.languageCode == 'de') {
      input = input.replaceAll("ß", "SS");
    }
    return input.toUpperCase();
}