on master help sign in
Simpler (but broader) props passing to StatelessTransaction
commite66e8abbecad72999a538404e5ff84bce1513d02 authorFang <git@fang.io> dateFri 7 Jun 2019, 19:26 (7 years ago) parente256356
9 files changed+9−80
src/bridge/Bridge.js+1 src/bridge/views/AcceptTransfer.js+1−10 src/bridge/views/CancelTransfer.js+1−10 src/bridge/views/CreateGalaxy.js+1−10 src/bridge/views/InvitesManage.js+1−10 src/bridge/views/IssueChild.js+1−10 src/bridge/views/SetKeys.js+1−10 src/bridge/views/SetProxy.js+1−10 src/bridge/views/Transfer.js+1−10
src/bridge/Bridge.js+1
@@ -353,6 +353,7 @@ class Bridge extends React.Component {
353353 networkRevisionCache={ networkRevisionCache }
354354 setNetworkSeedCache= { this.setNetworkSeedCache }
355355 // txn
356+ onSent={ this.setTxnHashCursor }
356357 setTxnHashCursor={ this.setTxnHashCursor }
357358 txnHashCursor={ txnHashCursor }
358359 setTxnConfirmations={ this.setTxnConfirmations }
src/bridge/views/AcceptTransfer.js+1−10
@@ -97,16 +97,7 @@ class AcceptTransfer extends React.Component {
9797
9898 <StatelessTransaction
9999 // Upper scope
100− web3={props.web3}
101− contracts={props.contracts}
102− wallet={props.wallet}
103− walletType={props.walletType}
104− walletHdPath={props.walletHdPath}
105− networkType={props.networkType}
106− onSent={props.setTxnHashCursor}
107− setTxnConfirmations={props.setTxnConfirmations}
108− popRoute={props.popRoute}
109− pushRoute={props.pushRoute}
100+ {...props}
110101 // Other
111102 canGenerate={ canGenerate }
112103 createUnsignedTxn={this.createUnsignedTxn}
src/bridge/views/CancelTransfer.js+1−10
@@ -65,16 +65,7 @@ class CancelTransfer extends React.Component {
6565 </P>
6666 <StatelessTransaction
6767 // Upper scope
68− web3={props.web3}
69− contracts={props.contracts}
70− wallet={props.wallet}
71− walletType={props.walletType}
72− walletHdPath={props.walletHdPath}
73− networkType={props.networkType}
74− onSent={props.setTxnHashCursor}
75− setTxnConfirmations={props.setTxnConfirmations}
76− popRoute={props.popRoute}
77− pushRoute={props.pushRoute}
68+ {...props}
7869 // Other
7970 canGenerate={ canGenerate }
8071 createUnsignedTxn={this.createUnsignedTxn} />
src/bridge/views/CreateGalaxy.js+1−10
@@ -189,16 +189,7 @@ class CreateGalaxy extends React.Component {
189189
190190 <StatelessTransaction
191191 // Upper scope
192− web3={props.web3}
193− contracts={props.contracts}
194− wallet={props.wallet}
195− walletType={props.walletType}
196− walletHdPath={props.walletHdPath}
197− networkType={props.networkType}
198− onSent={props.setTxnHashCursor}
199− setTxnConfirmations={props.setTxnConfirmations}
200− popRoute={props.popRoute}
201− pushRoute={props.pushRoute}
192+ {...props}
202193 // Other
203194 ref={this.statelessRef}
204195 canGenerate={canGenerate}
src/bridge/views/InvitesManage.js+1−10
@@ -163,16 +163,7 @@ class InvitesManage extends React.Component {
163163
164164 <StatelessTransaction
165165 // Upper scope
166− web3={this.props.web3}
167− contracts={this.props.contracts}
168− wallet={this.props.wallet}
169− walletType={this.props.walletType}
170− walletHdPath={this.props.walletHdPath}
171− networkType={this.props.networkType}
172− onSent={this.props.setTxnHashCursor}
173− setTxnConfirmations={this.props.setTxnConfirmations}
174− popRoute={this.props.popRoute}
175− pushRoute={this.props.pushRoute}
166+ {...this.props}
176167 // Other
177168 canGenerate={this.state.canGenerate}
178169 createUnsignedTxn={this.createUnsignedTxn}
src/bridge/views/IssueChild.js+1−10
@@ -240,16 +240,7 @@ class IssueChild extends React.Component {
240240
241241 <StatelessTransaction
242242 // Upper scope
243− web3={props.web3}
244− contracts={props.contracts}
245− wallet={props.wallet}
246− walletType={props.walletType}
247− walletHdPath={props.walletHdPath}
248− networkType={props.networkType}
249− onSent={props.setTxnHashCursor}
250− setTxnConfirmations={props.setTxnConfirmations}
251− popRoute={props.popRoute}
252− pushRoute={props.pushRoute}
243+ {...props}
253244 // Other
254245 canGenerate={canGenerate}
255246 createUnsignedTxn={this.createUnsignedTxn}
src/bridge/views/SetKeys.js+1−10
@@ -170,16 +170,7 @@ class SetKeys extends React.Component {
170170
171171 <StatelessTransaction
172172 // Upper scope
173− web3={props.web3}
174− contracts={props.contracts}
175− wallet={props.wallet}
176− walletType={props.walletType}
177− walletHdPath={props.walletHdPath}
178− networkType={props.networkType}
179− onSent={props.setTxnHashCursor}
180− setTxnConfirmations={props.setTxnConfirmations}
181− popRoute={props.popRoute}
182− pushRoute={props.pushRoute}
173+ {...props}
183174 // Tx
184175 canGenerate={ canGenerate }
185176 createUnsignedTxn={this.createUnsignedTxn}
src/bridge/views/SetProxy.js+1−10
@@ -169,16 +169,7 @@ class SetProxy extends React.Component {
169169
170170 <StatelessTransaction
171171 // Upper scope
172− web3={props.web3}
173− contracts={props.contracts}
174− wallet={props.wallet}
175− walletType={props.walletType}
176− walletHdPath={props.walletHdPath}
177− networkType={props.networkType}
178− onSent={props.setTxnHashCursor}
179− setTxnConfirmations={props.setTxnConfirmations}
180− popRoute={props.popRoute}
181− pushRoute={props.pushRoute}
172+ {...props}
182173 // Other
183174 ref={this.statelessRef}
184175 createUnsignedTxn={this.createUnsignedTxn}
src/bridge/views/Transfer.js+1−10
@@ -110,16 +110,7 @@ class Transfer extends React.Component {
110110
111111 <StatelessTransaction
112112 // Upper scope
113− web3={props.web3}
114− contracts={props.contracts}
115− wallet={props.wallet}
116− walletType={props.walletType}
117− walletHdPath={props.walletHdPath}
118− networkType={props.networkType}
119− onSent={props.setTxnHashCursor}
120− setTxnConfirmations={props.setTxnConfirmations}
121− popRoute={props.popRoute}
122− pushRoute={props.pushRoute}
113+ {...props}
123114 // Checks
124115 userApproval={state.userApproval}
125116 canGenerate={ canGenerate }