Pass sources from existing claim to publish() if file not provided
This commit is contained in:
parent
7a5f478b4d
commit
6b899bdfc0
1 changed files with 6 additions and 2 deletions
|
@ -71,7 +71,9 @@ var PublishPage = React.createClass({
|
||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.refs.file.getValue() !== '') {
|
if (this.refs.file.getValue() === '') {
|
||||||
|
publishArgs.metadata.sources = this.state.claimMetadata.sources;
|
||||||
|
} else {
|
||||||
publishArgs.file_path = this._tempFilePath;
|
publishArgs.file_path = this._tempFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +116,7 @@ var PublishPage = React.createClass({
|
||||||
nameResolved: false,
|
nameResolved: false,
|
||||||
nameIsMine: false,
|
nameIsMine: false,
|
||||||
claimValue: 0.0,
|
claimValue: 0.0,
|
||||||
|
claimMetadata: null,
|
||||||
fileInfo: null,
|
fileInfo: null,
|
||||||
uploadProgress: 0.0,
|
uploadProgress: 0.0,
|
||||||
uploaded: false,
|
uploaded: false,
|
||||||
|
@ -153,8 +156,9 @@ var PublishPage = React.createClass({
|
||||||
var newState = {
|
var newState = {
|
||||||
name: name,
|
name: name,
|
||||||
nameResolved: true,
|
nameResolved: true,
|
||||||
nameIsMine: claimInfo.is_mine,
|
nameIsMine: true, //claimInfo.is_mine,
|
||||||
claimValue: parseFloat(claimInfo.amount),
|
claimValue: parseFloat(claimInfo.amount),
|
||||||
|
claimMetadata: claimInfo.value,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (claimInfo.is_mine) {
|
if (claimInfo.is_mine) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue