Skip to content

Commit

Permalink
Change label on content file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariano Aguero committed Aug 30, 2018
1 parent b2775c5 commit 0539d7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/stepFour/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
handleContractsForFile,
handlerForFile,
scrollToBottom,
SUMMARY_FILE_CONTENTS
summaryFileContents
} from './utils'
import { noContractDataAlert, successfulDeployment, skippingTransaction } from '../../utils/alerts'
import {
Expand Down Expand Up @@ -217,7 +217,7 @@ export class stepFour extends React.Component {
downloadCrowdsaleInfo = () => {
const { contractStore, crowdsaleStore } = this.props
const zip = new JSZip()
const fileContents = SUMMARY_FILE_CONTENTS(contractStore.crowdsale.networkID)
const fileContents = summaryFileContents(contractStore.crowdsale.networkID)
let files = fileContents.files
const tiersCount = isObservableArray(this.props.tierStore.tiers) ? this.props.tierStore.tiers.length : 1
const contractsKeys = files.order
Expand Down
13 changes: 9 additions & 4 deletions src/components/stepFour/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ const reservedTokensHeaderTableElements = () => {
]
}

export const SUMMARY_FILE_CONTENTS = networkID => {
export const summaryFileContents = networkID => {
let minCapEl = []
let crowdsaleWhitelistElements = []
let tierWhitelistElements = []
Expand Down Expand Up @@ -1008,6 +1008,11 @@ export const SUMMARY_FILE_CONTENTS = networkID => {
return []
}

const isDutchStrategy = crowdsaleStore.strategy === CROWDSALE_STRATEGIES.DUTCH_AUCTION
const labelIdx = isDutchStrategy ? 'DutchIdx' : 'MintedCappedIdx'
const labelCrowdsale = isDutchStrategy ? 'Dutch Crowdsale' : 'Sale'
const labelToken = isDutchStrategy ? 'Dutch Token' : 'Token'

return {
common: [
...bigHeaderElements('*********TOKEN SETUP*********'),
Expand Down Expand Up @@ -1041,9 +1046,9 @@ export const SUMMARY_FILE_CONTENTS = networkID => {
smallHeader('*********CROWDSALE***********'),
{ value: 'Auth-os application name: ', parent: 'none', fileValue: crowdsaleStore.appName },
getCrowdsaleID(),
{ value: authOSContractString('MintedCappedIdx'), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "IDX", networkID) },
{ value: authOSContractString('Sale'), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "CROWDSALE", networkID) },
{ value: authOSContractString('Token'), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "TOKEN", networkID) },
{ value: authOSContractString(labelIdx), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "IDX", networkID) },
{ value: authOSContractString(labelCrowdsale), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "CROWDSALE", networkID) },
{ value: authOSContractString(labelToken), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "TOKEN", networkID) },
...getManagers,
...footerElemets
],
Expand Down

0 comments on commit 0539d7a

Please sign in to comment.