Skip to content

Commit 49171ae

Browse files
Rename to staticArgs, update description
Co-Authored-By: Simon <simonzachau@users.noreply.github.com>
1 parent 3776a9b commit 49171ae

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/components/Card.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Fin4Card extends React.Component {
6464
// instead of passing the proofTypeName, make an extra getName() call for that?
6565
method="transfer"
6666
toggleModal={this.toggleModal.bind(this)}
67-
fixArgs={{
67+
staticArgs={{
6868
recipient: this.props.recipientAddress
6969
}}
7070
/>

src/components/ContractForm.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// The original class was from here: https://github.com/trufflesuite/drizzle-react-components/blob/develop/src/ContractForm.js
22
// Much changed since then. The following PropTypes were added:
33
// contractAddress, contractName: used to get the contract via truffle-contract
4-
// fixArgs: for SC method arguments that are not for the user to set
4+
// staticArgs: additional arguments, which are always submitted regardless of the input arguments
55
// hideArgs: for SC method arguments that are being set computationally, based on the user's input in other fields
66
// buttonLabel: to customize the submit-button at the end of the form
77
// specialFields: this is used by the ProofSubmission class to customize the fields for requesting location access and for uploading a picture to IPFS
@@ -89,8 +89,8 @@ class ContractForm extends Component {
8989
var paramValuesIndicesArr = [];
9090

9191
const convertedInputs = this.inputs.map(input => {
92-
if (this.props.fixArgs && this.props.fixArgs[input.name]) {
93-
return this.props.fixArgs[input.name];
92+
if (this.props.staticArgs && this.props.staticArgs[input.name]) {
93+
return this.props.staticArgs[input.name];
9494
}
9595

9696
if (this.props.hideArgs && this.props.hideArgs[input.name] && this.props.multiSelectOptions) {
@@ -273,7 +273,7 @@ class ContractForm extends Component {
273273
<form onSubmit={this.handleSubmit} autoComplete="off">
274274
{this.inputs.map(({ name, type }, index) => {
275275
if (
276-
(this.props.fixArgs && this.props.fixArgs[name]) ||
276+
(this.props.staticArgs && this.props.staticArgs[name]) ||
277277
(this.props.hideArgs && this.props.hideArgs[name])
278278
) {
279279
return '';

src/views/Actions/ProofSubmission.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class ProofSubmission extends Component {
126126
contractAddress={proofObj.address}
127127
contractName={proofObj.name}
128128
method={'submitProof_' + proofObj.name}
129-
fixArgs={{
129+
staticArgs={{
130130
tokenAdrToReceiveProof: this.props.tokenAddress,
131131
claimId: this.props.claimId + ''
132132
}}

0 commit comments

Comments
 (0)