Skip to content

Commit

Permalink
Merge db092b3 into 0034ba4
Browse files Browse the repository at this point in the history
  • Loading branch information
mariano-aguero committed Aug 31, 2018
2 parents 0034ba4 + db092b3 commit 2874c84
Show file tree
Hide file tree
Showing 2 changed files with 15 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 @@ -219,7 +219,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
17 changes: 13 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,13 @@ 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'
const labelSaleManager = isDutchStrategy ? 'Dutch Crowdsale manager' : 'Sale manager'
const labelTokenManager = isDutchStrategy ? 'Dutch Token manager' : 'Token manager'

return {
common: [
...bigHeaderElements('*********TOKEN SETUP*********'),
Expand Down Expand Up @@ -1041,9 +1048,11 @@ 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) },
{ value: authOSContractString(labelSaleManager), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "CROWDSALE_MANAGER", networkID) },
{ value: authOSContractString(labelTokenManager), parent: 'none', fileValue: getCrowdsaleContractAddr(crowdsaleStore.strategy, "TOKEN_MANAGER", networkID) },
...getManagers,
...footerElemets
],
Expand Down

0 comments on commit 2874c84

Please sign in to comment.