Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

[instant] Update buy quote at start up in the case of default amount #1231

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

BMillman19
Copy link
Contributor

Description

  • Refactor our quote request and state change logic into its own module buyQuoteUpdater that can be invoked to request a new quote
  • buyQuoteUpdater is now being used by the asyncData fetch we're doing on mount to kick off a quote request for the default amount passed into props

Testing instructions

This link will preselect REP and prefill instant with 20 units to buy
http://localhost:5000/?defaultSelectedAssetData=0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862&defaultAssetBuyAmount=20

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Prefix PR title with bracketed package name(s) corresponding to the changed package(s). For example: [sol-cov] Fixed bug.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

@BMillman19 BMillman19 changed the title fix(instant): update buy quote at start up in the case of default amount [instant] update buy quote at start up in the case of default amount Nov 8, 2018
@BMillman19 BMillman19 changed the title [instant] update buy quote at start up in the case of default amount [instant] Update buy quote at start up in the case of default amount Nov 8, 2018
Copy link
Contributor

@steveklebanoff steveklebanoff left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -92,12 +92,11 @@ export class ZeroExInstantProvider extends React.Component<ZeroExInstantProvider
// tslint:disable-next-line:no-floating-promises
asyncData.fetchAvailableAssetDatasAndDispatchToStore(this._store);
}

asyncData.fetchCurrentBuyQuoteAndDispatchToStore(this._store);
Copy link
Contributor

Choose a reason for hiding this comment

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

need the tslint:disable-next-line:no-floating-promises here

@coveralls
Copy link

coveralls commented Nov 8, 2018

Coverage Status

Coverage decreased (-0.009%) to 84.721% when pulling 8493d61 on fix/instant/default-amount-quote into adcfe51 on development.

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

Successfully merging this pull request may close these issues.

3 participants