Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
1f574be1
Commit
1f574be1
authored
Jun 08, 2016
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #79 from ethereum/fix-udapp-trytillresponse
Fix tryTillResponse after recent changes
parents
f1f3b99d
55e1d284
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
universal-dapp.js
src/universal-dapp.js
+5
-5
No files found.
src/universal-dapp.js
View file @
1f574be1
...
@@ -481,7 +481,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -481,7 +481,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
}
else
if
(
args
.
abi
.
constant
&&
!
isConstructor
)
{
}
else
if
(
args
.
abi
.
constant
&&
!
isConstructor
)
{
replaceOutput
(
$result
,
getReturnOutput
(
result
));
replaceOutput
(
$result
,
getReturnOutput
(
result
));
}
else
{
}
else
{
tryTillResponse
(
result
,
function
(
err
,
result
)
{
tryTillResponse
(
self
.
web3
,
result
,
function
(
err
,
result
)
{
if
(
err
)
{
if
(
err
)
{
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
err
).
addClass
(
'error'
));
replaceOutput
(
$result
,
$
(
'<span/>'
).
text
(
err
).
addClass
(
'error'
));
}
else
if
(
isConstructor
)
{
}
else
if
(
isConstructor
)
{
...
@@ -569,7 +569,7 @@ UniversalDApp.prototype.deployLibrary = function (contractName, cb) {
...
@@ -569,7 +569,7 @@ UniversalDApp.prototype.deployLibrary = function (contractName, cb) {
self
.
getContractByName
(
contractName
).
address
=
result
.
createdAddress
;
self
.
getContractByName
(
contractName
).
address
=
result
.
createdAddress
;
cb
(
err
,
result
.
createdAddress
);
cb
(
err
,
result
.
createdAddress
);
}
else
{
}
else
{
tryTillResponse
(
result
,
function
(
err
,
finalResult
)
{
tryTillResponse
(
self
.
web3
,
result
,
function
(
err
,
finalResult
)
{
if
(
err
)
return
cb
(
err
);
if
(
err
)
return
cb
(
err
);
self
.
getContractByName
(
contractName
).
address
=
finalResult
.
contractAddress
;
self
.
getContractByName
(
contractName
).
address
=
finalResult
.
contractAddress
;
cb
(
null
,
finalResult
.
contractAddress
);
cb
(
null
,
finalResult
.
contractAddress
);
...
@@ -653,12 +653,12 @@ UniversalDApp.prototype.runTx = function (data, args, cb) {
...
@@ -653,12 +653,12 @@ UniversalDApp.prototype.runTx = function (data, args, cb) {
}
}
};
};
function
tryTillResponse
(
txhash
,
done
)
{
function
tryTillResponse
(
web3
,
txhash
,
done
)
{
this
.
web3
.
eth
.
getTransactionReceipt
(
txhash
,
testResult
);
web3
.
eth
.
getTransactionReceipt
(
txhash
,
testResult
);
function
testResult
(
err
,
address
)
{
function
testResult
(
err
,
address
)
{
if
(
!
err
&&
!
address
)
{
if
(
!
err
&&
!
address
)
{
setTimeout
(
function
()
{
tryTillResponse
(
txhash
,
done
);
},
500
);
setTimeout
(
function
()
{
tryTillResponse
(
web3
,
txhash
,
done
);
},
500
);
}
else
{
}
else
{
done
(
err
,
address
);
done
(
err
,
address
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment