Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Feature/token balance #204

Merged
merged 3 commits into from
May 4, 2020
Merged

Feature/token balance #204

merged 3 commits into from
May 4, 2020

Conversation

LiorAgnin
Copy link
Member

Proposed changes

Refactor:

  • Pro token model.

Feature:

  • Fetch token balances from etherscan.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • Refactor or a modification (non-breaking change)
  • New feature (non-breaking change which adds functionality)

@LiorAgnin LiorAgnin requested review from bejavu and LiorRabin May 3, 2020 17:36
LiorRabin
LiorRabin previously approved these changes May 4, 2020
Future<dynamic> fetchTokenBalance(String accountAddress, {void Function(BigInt) onDone, Function onError}) async {
try {
final BigInt balance = await tokenAPI.getTokenBalanceByAccountAddress(this.address, accountAddress);
if (this.amount.compareTo(balance) != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if this is false?

bool isFetchTokensBalances = store.state.proWalletState?.isFetchTokensBalances ?? false;
if (!isFetchTokensBalances) {
UserState userState = store.state.userState;
new Timer.periodic(Duration(seconds: 3), (Timer timer) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the interval should be in some config?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@LiorAgnin LiorAgnin merged commit 7059ab8 into master May 4, 2020
@LiorAgnin LiorAgnin deleted the feature/token_balance branch May 4, 2020 08:05
LiorAgnin added a commit that referenced this pull request Jun 28, 2020
* Hotfix/analycis (#185)

* analytics fixes and upgrade packages

* bump v

* update Community & Transfer Managers

* update packages

* bug fixes

* added appname in IdentifyCall

* fix

* fixed remarks

* Bump version to 1.1.20+141

* Bump version to 1.1.21+142

* login with device identifier (#186)

* Bump version to 1.1.22+143

* add new identifier for existing users (#187)

* identifier hotfix

* Feature/pro mode (#188)

* WIP

* WIP

* WIP

* WIP

* merged with maser

* PRO MODE is ready

* replaced icons

* update podlock

* fixed switch images

* minor

* fixed PR remarks

* minor fix

* Bump version to 1.1.23+144

* fixed (#190)

* Bump version to 1.1.24+145

* fixed pro mode remarks (#191)

* Bump version to 1.1.25+146

* Improve developer setup instructions in README (#194)

I encountered the following exception when trying to run the flutter
app in an Android device with `flutter run`:

    A problem occurred evaluating project ':app'.
    > path may not be null or empty string. path='null'

It turns out I needed to create a flutter keystore and add a
key.properties file to the project, as described here:

https://flutter.dev/docs/deployment/android

So I’ve updated the developer setup instructions in the README to
make these extra steps clearer.

* Update README.md

* Update README.md

* Delete .flutter-plugins-dependencies

* Delete google-services1.json

* Feature/pro mode final fixes (#199)

* WIP

* WIP

* TABS is ready

* initialRoute - last fixes

* more fixes

* more fixesss

* bump

* add dai is ready

* new fixess

* design qa fixess

* added screens && pro mode events

* added fake pending

* minor

* WIP

* bump v

* added more events for pro mode

* WIP

* WIP

* WIP

* bump

* fix

* fixs

* bump v

* bump

* lazy load images

* fix build

* final fixed

* added approve_job & indensia language

* bump v

* fixed language selector

* bugs fixess

* remove updateTheme

* update I18n files

* fixed timers

* change udid plugin (#198)

* Delete .flutter-plugins-dependencies

Co-authored-by: Tal Beja <tal@fuse.io>

* deps

* deps

* refresh token on start (#203)

* refresh token on start

* ref wallet_core

* Feature/token balance (#204)

* WIP

* works!

* added interval seconds variable to env

* Bump version to 1.1.30+162

* switch community on push with data (#207)

* switch community on push with data

* refactor

* change webview & add transak (#206)

* change webview

* back button on webview

* Bump version to 1.1.32+164

* hebrew fix (#208)

* hebrew fix

* minor

* sync backup with server (#205)

* Feature/phone numbers (#210)

* added app name to sentry

* fixed red screen

* added libphonenumber

* code cleanup

* send to phone number in another iso code

* fix

* minor

* added number to review page

* Bump version to 1.1.33+165

* some locks

* fixed (#211)

* fees added (#212)

* fees added

* cleanup

* bump v

* bump

* bugs fixes - fee

* removed unused variables

* wrapperAddress removed

* Bump version to 1.1.34+171

* Hotfix/fee (#213)

* oops

* update timestamp on update balance from etherscan

* Bump version to 1.1.35+172

* oops (#214)

* bump minor

* fixed switch community

* Hotfix/ui (#215)

* fixess

* pro token header bit higher

* ui fixes

* minor

* fixed switch community

* bump

* added loader when clicking on contact (#219)

* minor

Co-authored-by: Tal Beja <tal@fuse.io>
Co-authored-by: Leon Prouger <leonprou@gmail.com>
Co-authored-by: Zarino Zappia <mail@zarino.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants