-
Notifications
You must be signed in to change notification settings - Fork 22
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
DApp: User can Propose Reparameterization #164
Conversation
- Add API wrapper methods for performing reparam proposal - Add React elements for capturing the proposal and render the view on the Parameterizer page
…pose-reparameterization
- Add `approveForProposeReparameterization` API wrapper method - Wire up proposal transaction button to approve, then propose
|
||
export async function proposeReparameterization( | ||
paramName: string, | ||
newValue: BigNumber, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you tested this when running the built & served version of the DApp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I tested locally with the dev build. The transactions all go through, but I'll try this with the built+served version before I move forward.
Pull Request Test Coverage Report for Build 3255
💛 - Coveralls |
@@ -50,6 +50,18 @@ export async function approve(amount: BigNumber): Promise<TwoStepEthTransaction | |||
} | |||
} | |||
|
|||
export async function approveForProposeReparameterization(): Promise<TwoStepEthTransaction | void> { | |||
const civil = getCivil(); | |||
const tcr = civil.tcrSingletonTrusted(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just getTCR
?
} | ||
|
||
export default Parameterizer; | ||
const mapToStateToProps = (state: State, ownProps: ParameterizerPageProps): object => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not using ownprops, return type should be specified
import { setParameter } from "../actionCreators/parameterizer"; | ||
import { getParameterValue } from "../apis/civilTCR"; | ||
|
||
export async function initializeParameterizer(dispatch: Dispatch): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how are we keeping the parameter page in sync? is there an event we can subscribe to
…pose-reparameterization
…terValues` update - Add `MULTI_SET_PARAMETERS` action and reducer to squash the state changes into a single update
This PR also moves the Parameterizer State into Redux