conflict_resolution
stringlengths
27
16k
<<<<<<< <a href={`https://github.com/${github}`} target="_blank"> <div ======= <Tilt className="Tilt" options={{ max : 25 }} > <div >>>>>>> <a href={`https://github.com/${github}`} target="_blank"> <Tilt className="Tilt" options={{ max : 25 }} > <div <<<<<<< <Avatar github={github} index={index} /> <p style={{ background: "red", display: "inline", position: "absolute", minWidth: 120, bottom: 0, left: "35%", fontSize: 20, fontWeight: "bold", padding: "5px 10px", background: `linear-gradient(123.32deg, #A31EC8 2.81%, #FF00AA 96.06%)`, border: `2.63922px solid #FF04A8`, boxSizing: "border-box", boxShadow: `0px 131.961px 263.922px rgba(0, 0, 0, 0.2)`, borderRadius: `7.18104px`, transform: `rotate(-4deg)`, color: "#FFF", }} > {firstName} <br /> {lastName} </p> </div> </a> ======= <Avatar github={github} index={index} /> <p style={{ display: "inline", position: "absolute", minWidth: 120, bottom: 0, left: "35%", fontSize: 20, fontWeight: "bold", padding: "5px 10px", background: `linear-gradient(123.32deg, #A31EC8 2.81%, #FF00AA 96.06%)`, border: `2.63922px solid #FF04A8`, boxSizing: "border-box", boxShadow: `0px 131.961px 263.922px rgba(0, 0, 0, 0.2)`, borderRadius: `7.18104px`, transform: `rotate(-4deg)`, color: "#FFF", }} > {firstName} <br /> {lastName} </p> </div> </Tilt> >>>>>>> <Avatar github={github} index={index} /> <p style={{ display: "inline", position: "absolute", minWidth: 120, bottom: 0, left: "35%", fontSize: 20, fontWeight: "bold", padding: "5px 10px", background: `linear-gradient(123.32deg, #A31EC8 2.81%, #FF00AA 96.06%)`, border: `2.63922px solid #FF04A8`, boxSizing: "border-box", boxShadow: `0px 131.961px 263.922px rgba(0, 0, 0, 0.2)`, borderRadius: `7.18104px`, transform: `rotate(-4deg)`, color: "#FFF", }} > {firstName} <br /> {lastName} </p> </div> </a> </Tilt>
<<<<<<< ======= const { buildLocalTestnet } = require(`../../tasks/local-testnet/helpers`) const { cliBinary, nodeBinary } = require(`../../tasks/gaia.js`) const { join } = require(`path`) const testDir = join(__dirname, `..`, `..`, `testArtifacts`) >>>>>>> <<<<<<< ======= async before(done) { await bootLocalNetwork(testDir, { chainId: `test_chain`, overwrite: true, moniker: `local` }) done() }, >>>>>>> <<<<<<< browser .url(browser.launch_url) .execute(function () { window.localStorage.setItem(`keys`, JSON.stringify([{ name: `rich_account`, address: `cosmos1ek9cd8ewgxg9w5xllq9um0uf4aaxaruvcw4v9e`, wallet: `ae1d20a49e1085cca29a71e270c6f64f8f86794cb67c6922caea6bcba0ed9e60g+nSTgP8/wHpWaomDkhW/7g2Xldvno3VRFggvdpWIDrRV+n4BJtpk3UpLKo0K3SDL5dRzxz3NmGFnSA8znggFmtesdqu6jWJYzSNqaQhM/gCPTVabF7t1UHaybze1NRlYcm/wl5oOyXRpki6ugOHxNhF7+4wlzhYxMilAB7ekDB4+VVHoPMUinU4dsUdtC4XwDUA0rbX1TTmrh+i1eBp6UTQ+nHGiZXL1TkhhR1mE0fR3bLRunz5XagYtjoST33pecQWzqeaZZQ/mgm9QXu/i+ymfbnPQkh8ivx+J6/d2RfZuAV4NnwFZDUr7CzPX4TU` }])) return true }, []) ======= browser.url(browser.launch_url).execute(function() { window.localStorage.setItem( `keys`, JSON.stringify([ { name: `rich_account`, address: `cosmos1ek9cd8ewgxg9w5xllq9um0uf4aaxaruvcw4v9e`, wallet: `ae1d20a49e1085cca29a71e270c6f64f8f86794cb67c6922caea6bcba0ed9e60g+nSTgP8/wHpWaomDkhW/7g2Xldvno3VRFggvdpWIDrRV+n4BJtpk3UpLKo0K3SDL5dRzxz3NmGFnSA8znggFmtesdqu6jWJYzSNqaQhM/gCPTVabF7t1UHaybze1NRlYcm/wl5oOyXRpki6ugOHxNhF7+4wlzhYxMilAB7ekDB4+VVHoPMUinU4dsUdtC4XwDUA0rbX1TTmrh+i1eBp6UTQ+nHGiZXL1TkhhR1mE0fR3bLRunz5XagYtjoST33pecQWzqeaZZQ/mgm9QXu/i+ymfbnPQkh8ivx+J6/d2RfZuAV4NnwFZDUr7CzPX4TU` } ]) ) return true }, []) >>>>>>> browser.url(browser.launch_url).execute(function() { window.localStorage.setItem( `keys`, JSON.stringify([ { name: `rich_account`, address: `cosmos1ek9cd8ewgxg9w5xllq9um0uf4aaxaruvcw4v9e`, wallet: `ae1d20a49e1085cca29a71e270c6f64f8f86794cb67c6922caea6bcba0ed9e60g+nSTgP8/wHpWaomDkhW/7g2Xldvno3VRFggvdpWIDrRV+n4BJtpk3UpLKo0K3SDL5dRzxz3NmGFnSA8znggFmtesdqu6jWJYzSNqaQhM/gCPTVabF7t1UHaybze1NRlYcm/wl5oOyXRpki6ugOHxNhF7+4wlzhYxMilAB7ekDB4+VVHoPMUinU4dsUdtC4XwDUA0rbX1TTmrh+i1eBp6UTQ+nHGiZXL1TkhhR1mE0fR3bLRunz5XagYtjoST33pecQWzqeaZZQ/mgm9QXu/i+ymfbnPQkh8ivx+J6/d2RfZuAV4NnwFZDUr7CzPX4TU` } ]) ) return true }, []) <<<<<<< * After all the tests are run, evaluate if there were errors and exit appropriately. * * If there were failures or errors, exit 1, else exit 0. * * @param results */ reporter: function (results) { if ((typeof (results.failed) === `undefined` || results.failed === 0) && (typeof (results.error) === `undefined` || results.error === 0)) { ======= * After all the tests are run, evaluate if there were errors and exit appropriately. * * If there were failures or errors, exit 1, else exit 0. * * @param results */ reporter: function(results) { if ( (typeof results.failed === `undefined` || results.failed === 0) && (typeof results.error === `undefined` || results.error === 0) ) { >>>>>>> * After all the tests are run, evaluate if there were errors and exit appropriately. * * If there were failures or errors, exit 1, else exit 0. * * @param results */ reporter: function(results) { if ( (typeof results.failed === `undefined` || results.failed === 0) && (typeof results.error === `undefined` || results.error === 0) ) { <<<<<<< ======= } const bootLocalNetwork = async (targetDir, options) => { console.log(`using cli binary`, cliBinary) console.log(`using node binary`, nodeBinary) await buildLocalTestnet(targetDir, 3, options) >>>>>>>
<<<<<<< wrapper = instance.wrapper store = instance.store wrapper.vm.$refs.undelegationModal = { open: () => { } } wrapper.vm.$refs.delegationModal = { open: () => { } } ======= >>>>>>> <<<<<<< }) it(`should return one delegate based on route params`, () => { expect(wrapper.vm.validator.operator_address).toEqual( lcdClientMock.validators[0] ) }) it(`shows a default avatar`, () => { expect(wrapper.vm.$el).toMatchSnapshot() }) it(`should return the self bond based on the validator`, () => { const validator = { selfBond: 1 } wrapper.setData({ validator }) expect(wrapper.vm.selfBond).toBe(`100.00%`) validator.selfBond = undefined wrapper.setData({ validator }) expect(wrapper.vm.selfBond).toBe(`0.00%`) }) describe(`myDelegation`, () => { it(`when user has delegations`, () => { const bondDenom = `stake` const myBond = 10 const delegationString = PageValidator.computed.myDelegation.call( { bondDenom, myBond } ) expect(delegationString).toBe(`10.00 stake`) }) it(`when user doesn't have any delegations`, () => { const bondDenom = `stake` const myBond = 0 const delegationString = PageValidator.computed.myDelegation.call( { bondDenom, myBond } ) expect(delegationString).toBe(`--`) }) }) describe(`rewards`, () => { let bondDenom, validator, session beforeEach(() => { bondDenom = `stake` validator = { operator_address: `cosmos1address` } session = getterValues.session }) it(`gets rewards from validator if it has some`, () => { const distribution = { rewards: { [validator.operator_address]: { [bondDenom]: 10 } } } const rewardsString = PageValidator.computed.rewards.call( { session, bondDenom, distribution, validator } ) expect(rewardsString).toBe(`10.00 stake`) }) it(`when validator rewards are 0`, () => { const distribution = { rewards: { [validator.operator_address]: { [bondDenom]: 0 } } } const rewardsString = PageValidator.computed.rewards.call( { session, bondDenom, distribution, validator } ) expect(rewardsString).toBe(`0.00 stake`) }) it(`when user doesn't have any delegations`, () => { const distribution = { rewards: {} } const rewardsString = PageValidator.computed.rewards.call( { session, bondDenom, distribution, validator } ) expect(rewardsString).toBeNull() }) }) it(`shows an error if the validator couldn't be found`, () => { const instance = mount(PageValidator, { getters: { session: () => ({ desktop: false }), delegates: () => ({ delegates: [] }), bondDenom: () => stakingParameters.parameters.bond_denom, wallet: () => ({ address: `cosmos15ky9du8a2wlstz6fpx3p4mqpjyrm5ctpesxxn9` }) }, mocks: { $route: { params: { validator: validator.operator_address } } }, stubs: { "undelegation-modal": true, "delegation-modal": true, "short-bech32": true ======= it(`should return one delegate based on route params`, () => { expect(wrapper.vm.validator.operator_address).toEqual( validator.operator_address ) }) it(`shows a default avatar`, () => { expect(wrapper.html()).toContain(`validator-icon.svg`) }) it(`should return the self bond based on the validator`, () => { const validator = { selfBond: 1 >>>>>>> it(`should return one delegate based on route params`, () => { expect(wrapper.vm.validator.operator_address).toEqual( validator.operator_address ) }) it(`shows a default avatar`, () => { expect(wrapper.html()).toContain(`validator-icon.svg`) }) it(`should return the self bond based on the validator`, () => { const validator = { selfBond: 1 <<<<<<< }) ] expect(wrapper.vm.status).toBe( `This validator does not have enough voting power yet and is inactive` ) }) // TODO: enable when we decide on limits are defined // it("switches color indicators", async () => { // store.state.delegates.delegates = [ // Object.assign({}, delegate, { // commission: "0" // }) // ] // expect(wrapper.find("#validator-profile__commission").classes()).toContain( // "green" // ) // // store.state.delegates.delegates = [ // Object.assign({}, delegate, { // commission: "0.02" // }) // ] // expect(wrapper.find("#validator-profile__commission").classes()).toContain( // "yellow" // ) // // store.state.delegates.delegates = [ // Object.assign({}, delegate, { // commission: "1" // }) // ] // expect(wrapper.find("#validator-profile__commission").classes()).toContain( // "red" // ) // // store.state.delegates.globalPower = 1000 // store.state.delegates.delegates = [ // Object.assign({}, delegate, { // tokens: "1000" // }) // ] // expect(wrapper.find("#validator-profile__power").classes()).toContain("red") // // store.state.delegates.delegates = [ // Object.assign({}, delegate, { // tokens: "10" // }) // ] // expect(wrapper.find("#validator-profile__power").classes()).toContain( // "yellow" // ) // // store.state.delegates.delegates = [ // Object.assign({}, delegate, { // tokens: "1" // }) // ] // expect(wrapper.find("#validator-profile__power").classes()).toContain( // "green" // ) // }) it(`shows a validator as candidate if he has no voting_power`, () => { store.state.delegates.delegates = [ Object.assign({}, validator, { voting_power: `0` }) ] expect(wrapper.vm.status).toMatchSnapshot() // expect(wrapper.find(".page-profile__status").classes()).toContain( // "yellow" // ) }) it(`shows that a validator is revoked`, () => { store.state.delegates.delegates = [ Object.assign({}, validator, { ======= })] expect(wrapper.vm.status).toBe( `This validator does not have enough voting power yet and is inactive` ) }) it(`shows a validator as candidate if he has no voting_power`, () => { $store.getters.delegates.delegates = [Object.assign({}, validator, { voting_power: 0 })] expect(wrapper.vm.status).toMatchSnapshot() }) it(`shows that a validator is revoked`, () => { $store.getters.delegates.delegates = [Object.assign({}, validator, { >>>>>>> })] expect(wrapper.vm.status).toBe( `This validator does not have enough voting power yet and is inactive` ) }) it(`shows a validator as candidate if he has no voting_power`, () => { $store.getters.delegates.delegates = [Object.assign({}, validator, { voting_power: 0 })] expect(wrapper.vm.status).toMatchSnapshot() }) it(`shows that a validator is revoked`, () => { $store.getters.delegates.delegates = [Object.assign({}, validator, { <<<<<<< let wrapper, store beforeEach(() => { const { mount } = setup() const instance = mount(PageValidator, { doBefore: ({ store }) => { store.commit(`setSignIn`, true) store.commit(`setCommittedDelegation`, { candidateId: lcdClientMock.validators[0], value: 100 }) store.commit(`setConnected`, true) store.commit(`setStakingParameters`, stakingParameters.parameters) store.commit(`setDelegates`, [validator, validatorTo]) store.commit(`updateWalletBalance`, { denom: `STAKE`, amount: 1337 }) store.state.wallet.address = lcdClientMock.addresses[0] store.commit(`setStakingParameters`, stakingParameters.parameters) }, mocks: { $route: { params: { validator: validator.operator_address } } }, stubs: { "undelegation-modal": true, "delegation-modal": true, "short-bech32": true }, getters: { bondDenom: () => stakingParameters.parameters.bond_denom, wallet: () => ({ address: `cosmos15ky9du8a2wlstz6fpx3p4mqpjyrm5ctpesxxn9` }) } }) wrapper = instance.wrapper store = instance.store wrapper.vm.$refs.undelegationModal = { open: () => { } } wrapper.vm.$refs.delegationModal = { open: () => { } } }) ======= >>>>>>>
<<<<<<< ======= import BigNumber from "bignumber.js" import Delegation from "renderer/vuex/modules/delegation" >>>>>>> import BigNumber from "bignumber.js" import Delegation from "renderer/vuex/modules/delegation"
<<<<<<< date: new Date('2018-11-04'), changes: <>Added <SpellLink id={SPELLS.INFERNO_TALENT.id} /> and <SpellLink id={SPELLS.ROARING_BLAZE_TALENT.id} /> talent modules.</>, contributors: [Chizu], }, { ======= date: new Date('2018-11-04'), changes: <>Added <SpellLink id={SPELLS.FLASHOVER_TALENT.id} /> and <SpellLink id={SPELLS.SOUL_FIRE_TALENT.id} /> talent modules.</>, contributors: [Chizu], }, { date: new Date('2018-11-04'), changes: <>Added <SpellLink id={SPELLS.INTERNAL_COMBUSTION_TALENT.id} /> and <SpellLink id={SPELLS.SHADOWBURN_TALENT.id} /> talent modules.</>, contributors: [Chizu], }, { >>>>>>> date: new Date('2018-11-04'), changes: <>Added <SpellLink id={SPELLS.INFERNO_TALENT.id} /> and <SpellLink id={SPELLS.ROARING_BLAZE_TALENT.id} /> talent modules.</>, contributors: [Chizu], }, { date: new Date('2018-11-04'), changes: <>Added <SpellLink id={SPELLS.FLASHOVER_TALENT.id} /> and <SpellLink id={SPELLS.SOUL_FIRE_TALENT.id} /> talent modules.</>, contributors: [Chizu], }, { date: new Date('2018-11-04'), changes: <>Added <SpellLink id={SPELLS.INTERNAL_COMBUSTION_TALENT.id} /> and <SpellLink id={SPELLS.SHADOWBURN_TALENT.id} /> talent modules.</>, contributors: [Chizu], }, {
<<<<<<< let rendererConfig = { devtool: process.env.NODE_ENV === `production` ? false : `#inline-source-map`, ======= const rendererConfig = { devtool: process.env.NODE_ENV === `production` ? `#source-map` : `#inline-source-map`, >>>>>>> const rendererConfig = { devtool: process.env.NODE_ENV === `production` ? false : `#inline-source-map`,
<<<<<<< validator_address: lcdClientMock.validators[0], balance: { amount: 1 }, min_time: new Date(Date.now()).toUTCString() ======= validator_addr: lcdClientMock.validators[0], entries: [{ balance: `1`, min_time: new Date(Date.now()).toUTCString() }], >>>>>>> validator_address: lcdClientMock.validators[0], entries: [{ balance: `1`, min_time: new Date(Date.now()).toUTCString() }], <<<<<<< validator_address: lcdClientMock.validators[0], balance: { amount: 1 }, min_time: new Date(Date.now()).toUTCString() ======= validator_addr: lcdClientMock.validators[0], entries: [{ balance: `1`, min_time: new Date(Date.now()).toUTCString() }], >>>>>>> validator_address: lcdClientMock.validators[0], entries: [{ balance: `1`, min_time: new Date(Date.now()).toUTCString() }], <<<<<<< validator_address: lcdClientMock.validators[2], balance: { amount: 1 } ======= validator_addr: lcdClientMock.validators[2], entries: [{ balance: 1 }] >>>>>>> validator_address: lcdClientMock.validators[2], entries: [{ balance: 1 }] <<<<<<< validator_address: lcdClientMock.validators[0], balance: { amount: 1 }, min_time: `Thu, 01 Jan 1970 00:00:42 GMT` ======= validator_addr: lcdClientMock.validators[0], entries: [{ balance: `1`, min_time: `Thu, 01 Jan 1970 00:00:42 GMT` }] >>>>>>> validator_address: lcdClientMock.validators[0], entries: [{ balance: `1`, min_time: `Thu, 01 Jan 1970 00:00:42 GMT` }] <<<<<<< it(`deletes undelegations that are 0`, async () => { mutations.setUnbondingDelegations(state, [ { validator_address: `cosmosvaladdr15ky9du8a2wlstz6fpx3p4mqpjyrm5ctqzh8yqw`, balance: { amount: 0 } } ]) expect( state.unbondingDelegations .cosmosvaladdr15ky9du8a2wlstz6fpx3p4mqpjyrm5ctqzh8yqw ).toBeUndefined() }) ======= >>>>>>> <<<<<<< validator_address: lcdClientMock.validators[0], balance: { amount: `100` }, creation_height: `12`, min_time: new Date().toUTCString() ======= validator_addr: lcdClientMock.validators[0], entries: [{ balance: `100`, creation_height: `12`, min_time: new Date().toUTCString() }], >>>>>>> validator_address: lcdClientMock.validators[0], entries: [{ balance: `100`, creation_height: `12`, min_time: new Date().toUTCString() }],
<<<<<<< import SPELLS from 'common/SPELLS'; import Module from 'Parser/Core/Module'; ======= import Analyzer from 'Parser/Core/Analyzer'; >>>>>>> import SPELLS from 'common/SPELLS'; import Analyzer from 'Parser/Core/Analyzer';
<<<<<<< store = instance.store store.commit(`setStakingParameters`, stakingParameters.parameters) wrapper.update() ======= >>>>>>> store = instance.store store.commit(`setStakingParameters`, stakingParameters.parameters)
<<<<<<< log(`starting basecli server with nodeIP ${nodeIP}`) lcdProcess = await startLCD(lcdHome, nodeIP) log("basecli server ready") ======= if (!MOCK) { log(`starting gaia server with nodeIP ${nodeIP}`) lcdProcess = await startLCD(lcdHome, nodeIP) log("gaia server ready") } >>>>>>> if (!MOCK) { log(`starting basecli server with nodeIP ${nodeIP}`) lcdProcess = await startLCD(lcdHome, nodeIP) log("basecli server ready") } <<<<<<< let init = true if (rootExists) { log(`root exists (${root})`) // NOTE: when changing this code, always make sure the app can never // overwrite/delete existing data without at least backing it up, // since it may contain the user's private keys and they might not // have written down their seed words. // they might get pretty mad if the app deletes their money! // check if the existing data came from a compatible app version // if not, fail with an error if ( consistentConfigDir( appVersionPath, genesisPath, configPath, basecliVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" if (compatible) { log("configs are compatible with current app version") init = false ======= if (!MOCK) { let init = true if (rootExists) { log(`root exists (${root})`) // NOTE: when changing this code, always make sure the app can never // overwrite/delete existing data without at least backing it up, // since it may contain the user's private keys and they might not // have written down their seed words. // they might get pretty mad if the app deletes their money! // check if the existing data came from a compatible app version // if not, fail with an error if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" if (compatible) { log("configs are compatible with current app version") init = false } else { // TODO: versions of the app with different data formats will need to learn how to // migrate old data throw Error(`Data was created with an incompatible app version data=${existingVersion} app=${pkg.version}`) } >>>>>>> if (!MOCK) { let init = true if (rootExists) { log(`root exists (${root})`) // NOTE: when changing this code, always make sure the app can never // overwrite/delete existing data without at least backing it up, // since it may contain the user's private keys and they might not // have written down their seed words. // they might get pretty mad if the app deletes their money! // check if the existing data came from a compatible app version // if not, fail with an error if ( consistentConfigDir( appVersionPath, genesisPath, configPath, basecliVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" if (compatible) { log("configs are compatible with current app version") init = false } else { // TODO: versions of the app with different data formats will need to learn how to // migrate old data throw Error(`Data was created with an incompatible app version data=${existingVersion} app=${pkg.version}`) } <<<<<<< let _lcdInitialized = true // await lcdInitialized(join(root, 'lcd')) log("LCD is" + (_lcdInitialized ? "" : "not") + "initialized") if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) ======= let _lcdInitialized = await lcdInitialized(join(root, "lcd")) log("LCD is" + (_lcdInitialized ? "" : " not") + " initialized") if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) } >>>>>>> let _lcdInitialized = true // await lcdInitialized(join(root, 'lcd')) log("LCD is" + (_lcdInitialized ? "" : "not") + "initialized") if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) }
<<<<<<< await store.dispatch("submitDelegation", { stakingTransactions }) ======= await store.dispatch(`submitDelegation`, { delegations }) >>>>>>> await store.dispatch(`submitDelegation`, { stakingTransactions }) <<<<<<< jest.spyOn(store._actions.sendTx, "0") ======= jest.spyOn(store._actions.sendTx, `0`) const delegates = store.state.delegates.delegates >>>>>>> jest.spyOn(store._actions.sendTx, `0`) <<<<<<< await store.dispatch("submitDelegation", { stakingTransactions }) ======= await store.dispatch(`submitDelegation`, { unbondings }) >>>>>>> await store.dispatch(`submitDelegation`, { stakingTransactions })
<<<<<<< ======= store.commit(`setAtoms`, 1337) wrapper.vm.$refs.modalPropose = { open: () => {} } >>>>>>> wrapper.vm.$refs.modalPropose = { open: () => {} }
<<<<<<< let rest = RestClient(MOCK ? 'http://localhost:8999' : null) ======= if (JSON.parse(process.env.COSMOS_UI_ONLY || 'false')) { return Promise.resolve({ rpc: { on: () => {}, subscribe: () => {}, validators: () => {}, status: () => {} }, generateKey: () => ({ key: { address: 'UI_ONLY_MODE' } }), queryAccount: () => {}, queryNonce: () => {} }) } const RestClient = require('cosmos-sdk') const RpcClient = require('tendermint') let rest = RestClient() >>>>>>> if (JSON.parse(process.env.COSMOS_UI_ONLY || 'false')) { return Promise.resolve({ rpc: { on: () => {}, subscribe: () => {}, validators: () => {}, status: () => {} }, generateKey: () => ({ key: { address: 'UI_ONLY_MODE' } }), queryAccount: () => {}, queryNonce: () => {} }) } const RestClient = require('cosmos-sdk') const RpcClient = require('tendermint') let rest = RestClient(MOCK ? 'http://localhost:8999' : null)
<<<<<<< let { denom } = delegation let amount = parseInt(delegation.amount) if (amount < 0) { return txResult(1, `Amount cannot be negative`) } if (fromAccount.coins.find(c => c.denom === denom).amount < amount) { return txResult(1, `Not enough coins in your account`) } // update sender account incrementSequence(fromAccount) fromAccount.coins.find(c => c.denom === denom).amount -= amount ======= let denom = state.stakingParameters.parameters.bond_denom for (let tx of delegations) { let amount = parseInt(tx.delegation.amount) if (amount < 0) { results.push(txResult(1, `Amount cannot be negative`)) return results } if (fromAccount.coins.find(c => c.denom === denom).amount < amount) { results.push(txResult(1, `Not enough coins in your account`)) return results } // update sender account incrementSequence(fromAccount) fromAccount.coins.find(c => c.denom === denom).amount -= amount // update stake let delegation = delegator.delegations.find( d => d.validator_addr === tx.validator_addr ) if (!delegation) { delegation = { delegator_addr: fromKey.address, validator_addr: tx.validator_addr, shares: `0`, height: 0 } delegator.delegations.push(delegation) } >>>>>>> let denom = state.stakingParameters.parameters.bond_denom let amount = parseInt(delegation.amount) if (amount < 0) { return txResult(1, `Amount cannot be negative`) } if (fromAccount.coins.find(c => c.denom === denom).amount < amount) { return txResult(1, `Not enough coins in your account`) } // update sender account incrementSequence(fromAccount) fromAccount.coins.find(c => c.denom === denom).amount -= amount <<<<<<< delegator = state.stake[fromKey.address] } if (fromAccount == null) { return txResult(1, `Nonexistent account`) } // check nonce if (parseInt(fromAccount.sequence) !== parseInt(sequence)) { return txResult( 2, `Expected sequence "${fromAccount.sequence}", got "${sequence}"` ======= // update sender balance let coinBalance = fromAccount.coins.find( c => c.denom === state.stakingParameters.parameters.bond_denom >>>>>>> delegator = state.stake[fromKey.address] } if (fromAccount == null) { return txResult(1, `Nonexistent account`) } // check nonce if (parseInt(fromAccount.sequence) !== parseInt(sequence)) { return txResult( 2, `Expected sequence "${fromAccount.sequence}", got "${sequence}"` <<<<<<< let height = getHeight() ======= // add redelegation object let coins = { amount: tx.shares, // in mock mode we assume 1 share = 1 token denom: state.stakingParameters.parameters.bond_denom } let minTime = Date.now() red = { delegator_addr: tx.delegator_addr, validator_src_addr: tx.validator_src_addr, validator_dst_addr: tx.validator_dst_addr, shares_src: tx.shares, shares_dst: tx.shares, min_time: new Date(minTime + 10 * 60 * 1000).getTime(), // uses a 10 min unbonding period creation_height: height, initial_balance: coins, balance: coins } delegator.redelegations.push(red) >>>>>>> let height = getHeight()
<<<<<<< let balanceEl = (denom) => $(`//div[contains(text(), "${denom.toUpperCase()}")]`) .$('..') .$('div.ni-li-dd') ======= let balanceEl = (denom) => { let balanceElemSlector = `//div[contains(text(), "${denom.toUpperCase()}")]` return client.waitForExist(balanceElemSlector, 10000) .then(() => $(balanceElemSlector) .$('..') .$('div.ni-li-dd') ) } >>>>>>> let balanceEl = (denom) => { let balanceElemSlector = `//div[contains(text(), "${denom.toUpperCase()}")]` return client.waitForExist(balanceElemSlector, 10000) .then(() => $(balanceElemSlector) .$('..') .$('div.ni-li-dd')
<<<<<<< wrapper = instance.wrapper store = instance.store node = instance.node await store.dispatch(`signIn`, { account: name, password }) ======= wrapper = test.wrapper store = test.store >>>>>>> wrapper = instance.wrapper store = instance.store await store.dispatch(`signIn`, { account: name, password })
<<<<<<< // start baseserver REST API async function startBaseserver(home, nodeIP) { log('startBaseserver', home) ======= // start lcd REST API async function startLCD (home, nodeIP) { log('startLCD', home) >>>>>>> // start lcd REST API async function startLCD (home, nodeIP) { log('startLCD', home) <<<<<<< async function initBaseserver(chainId, home, node) { ======= async function initLCD (chainId, home, node) { >>>>>>> async function initLCD (chainId, home, node) { <<<<<<< const { ipcMain } = require('electron') function handleIPC(seeds) { ipcMain.on('booted', () => { nodeIP = pickNode(seeds) // check if the lcd is initialized and if not intitialize it let _baseserverInitialized = await baseserverInitialized(join(root, 'baseserver')) console.log('Baseserver is', _baseserverInitialized ? '' : 'not', 'initialized') if (init || !_baseserverInitialized) { log(`Trying to initialize baseserver with remote node ${nodeIP}`) await initBaseserver(chainId, baseserverHome, nodeIP) } // connect to the node await connect(seeds, nodeIP) }) ipcMain.on('successful-launch', () => { console.log('[START SUCCESS] Vue app successfuly started') }) ipcMain.on('reconnect', (event) => { reconnect(seeds) }) } // check if baseserver is initialized as the configs could be corrupted ======= // check if LCD is initialized as the configs could be corrupted >>>>>>> const { ipcMain } = require('electron') function handleIPC(seeds) { ipcMain.on('booted', () => { nodeIP = pickNode(seeds) // check if the lcd is initialized and if not intitialize it let _baseserverInitialized = await baseserverInitialized(join(root, 'baseserver')) console.log('Baseserver is', _baseserverInitialized ? '' : 'not', 'initialized') if (init || !_baseserverInitialized) { log(`Trying to initialize baseserver with remote node ${nodeIP}`) await initBaseserver(chainId, baseserverHome, nodeIP) } // connect to the node await connect(seeds, nodeIP) }) ipcMain.on('successful-launch', () => { console.log('[START SUCCESS] Vue app successfuly started') }) ipcMain.on('reconnect', (event) => { reconnect(seeds) }) } // check if LCD is initialized as the configs could be corrupted <<<<<<< function baseserverInitialized(home) { log('Testing if baseserver is already initialized') ======= function lcdInitialized (home) { log('Testing if LCD is already initialized') >>>>>>> function lcdInitialized (home) { log('Testing if LCD is already initialized') <<<<<<< ======= nodeIP = pickNode(seeds) let _lcdInitialized = await lcdInitialized(join(root, 'lcd')) console.log('LCD is', _lcdInitialized ? '' : 'not', 'initialized') if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) } await connect(seeds, nodeIP) >>>>>>> let _lcdInitialized = await lcdInitialized(join(root, 'lcd')) console.log('LCD is', _lcdInitialized ? '' : 'not', 'initialized') if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) } await connect(seeds, nodeIP)
<<<<<<< type Tally { yes: String # BigNumber no: String # BigNumber abstain: String # BigNumber veto: String # BigNumber total: String # BigNumber totalVotedPercentage: Float } ======= type Coin { amount: String denom: String } >>>>>>> type Tally { yes: String # BigNumber no: String # BigNumber abstain: String # BigNumber veto: String # BigNumber total: String # BigNumber totalVotedPercentage: Float } type Coin { amount: String denom: String } <<<<<<< type GovernanceParameters { depositDenom: String votingThreshold: Float vetoThreshold: Float depositThreshold: String # BigNumber } type Vote { option: String } ======= type BankTransaction { hash: String! height: Int! timestamp: String gasUsed: Int gasWanted: Int senderAddress: String! recipientAddress: String! amount: Coin success: Boolean log: String memo: String fee: Coin signature: String } >>>>>>> type Undelegation { delegatorAddress: String! validatorAddress: String! amount: String! startHeight: String! endTime: String! } type GovernanceParameters { depositDenom: String votingThreshold: Float vetoThreshold: Float depositThreshold: String # BigNumber } type Vote { option: String } type BankTransaction { hash: String! height: Int! timestamp: String gasUsed: Int gasWanted: Int senderAddress: String! recipientAddress: String! amount: Coin success: Boolean log: String memo: String fee: Coin signature: String } <<<<<<< vote(networkId: String!, proposalId: Int!, address: String!): Vote governanceParameters(networkId: String!): GovernanceParameters validator(networkId: String!, address: String!): Validator ======= validator(networkId: String!, operatorAddress: String!): Validator >>>>>>> vote(networkId: String!, proposalId: Int!, address: String!): Vote governanceParameters(networkId: String!): GovernanceParameters validator(networkId: String!, operatorAddress: String!): Validator
<<<<<<< jest.mock('fs-extra', () => { let fs = require('fs') ======= function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) } jest.mock("fs-extra", () => { let fs = require("fs") >>>>>>> jest.mock("fs-extra", () => { let fs = require("fs") <<<<<<< mockFs.writeFile( './app/networks/gaia-2/config.toml', fs.readFileSync('./app/networks/gaia-2/config.toml', 'utf8') ) mockFs.writeFile( './app/networks/gaia-2/genesis.json', fs.readFileSync('./app/networks/gaia-2/genesis.json', 'utf8') ) mockFs.writeFile( './app/networks/gaia-2/gaiaversion.txt', fs.readFileSync('./app/networks/gaia-2/gaiaversion.txt', 'utf8') ) ======= mockFs.writeFile( "./app/networks/gaia-2/config.toml", fs.readFileSync("./app/networks/gaia-2/config.toml", "utf8") ) mockFs.writeFile( "./app/networks/gaia-2/genesis.json", fs.readFileSync("./app/networks/gaia-2/genesis.json", "utf8") ) mockFs.writeFile( "./app/networks/gaia-2/gaiaversion.txt", fs.readFileSync("./app/networks/gaia-2/gaiaversion.txt", "utf8") ) >>>>>>> mockFs.writeFile( "./app/networks/gaia-2/config.toml", fs.readFileSync("./app/networks/gaia-2/config.toml", "utf8") ) mockFs.writeFile( "./app/networks/gaia-2/genesis.json", fs.readFileSync("./app/networks/gaia-2/genesis.json", "utf8") ) mockFs.writeFile( "./app/networks/gaia-2/gaiaversion.txt", fs.readFileSync("./app/networks/gaia-2/gaiaversion.txt", "utf8") ) <<<<<<< loadURL () {} on () {} maximize () {} ======= loadURL() {} on() {} maximize() {} >>>>>>> loadURL() {} on() {} maximize() {} <<<<<<< if (type === 'exit' && args.includes('init') && args.length > 4) { ======= if (type === "exit" && args[1] === "init" && args.length > 4) { >>>>>>> if (type === "exit" && args.includes("init") && args.length > 4) { <<<<<<< stdin: { write: () => {} }, stdout: stdoutMocks(path, args), stderr: stderrMocks(path, args) ======= stdout: { on: (type, cb) => { if (args[0] === "version" && type === "data") { cb({ toString: () => "v0.5.0" }) } } }, stderr: { on: (type, cb) => { // test for init of gaia if (type === "data" && args[1] === "init" && args.length === 4) { cb({ toString: () => "already is initialized" }) } } } >>>>>>> stdin: { write: () => {} }, stdout: stdoutMocks(path, args), stderr: stderrMocks(path, args) <<<<<<< let root = '../../../'; let appRoot = root + 'app/'; let testRoot = './test/unit/tmp/test_root/'; ======= let root = "../../../" let appRoot = root + "app/" let testRoot = "./test/unit/tmp/test_root/" >>>>>>> let root = "../../../" let appRoot = root + "app/" let testRoot = "./test/unit/tmp/test_root/" <<<<<<< LOGGING: 'false', COSMOS_NETWORK: 'app/networks/gaia-2', ======= LOGGING: false, COSMOS_NETWORK: "app/networks/gaia-2", >>>>>>> LOGGING: "false", COSMOS_NETWORK: "app/networks/gaia-2", <<<<<<< jest.mock(appRoot + 'src/root.js', () => './test/unit/tmp/test_root') ======= jest.mock(appRoot + "src/root.js", () => "./test/unit/tmp/test_root") jest.mock("event-to-promise", () => { let i = 0 return () => Promise.resolve({ toString: () => { if (i++ >= 1) { return "Serving on" } else { return "Test" } } }) }) >>>>>>> jest.mock(appRoot + "src/root.js", () => "./test/unit/tmp/test_root") <<<<<<< it('should not init gaia server again', async function () { expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes('gaia') && args.includes('server') && args.includes('init') ======= it("should not init gaia server again", async function() { expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes("gaia") && args.includes("server") && args.includes("init") >>>>>>> it("should not init gaia server again", async function() { expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes("gaia") && args.includes("server") && args.includes("init") <<<<<<< it('should start gaia server', async function () { expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes('gaia') && args.includes('rest-server') ======= it("should start gaia server", async function() { expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes("gaia") && args.includes("rest-server") >>>>>>> it("should start gaia server", async function() { expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes("gaia") && args.includes("rest-server") <<<<<<< expect(send.mock.calls[0][0]).toBe('error') expect(send.mock.calls[0][1].message).toContain( 'incompatible app version' ) ======= expect(send.mock.calls[0][0]).toBe("error") expect(send.mock.calls[0][1].message).toContain( "incompatible app version" ) >>>>>>> expect(send.mock.calls[0][0]).toBe("error") expect(send.mock.calls[0][1].message).toContain( "incompatible app version" ) <<<<<<< let existingGenesis = JSON.parse( fs.readFileSync(testRoot + 'genesis.json', 'utf8') ) existingGenesis.genesis_time = new Date().toString() fs.writeFileSync( testRoot + 'genesis.json', JSON.stringify(existingGenesis) ) ======= let existingGenesis = JSON.parse( fs.readFileSync(testRoot + "genesis.json", "utf8") ) existingGenesis.genesis_time = new Date().toString() fs.writeFileSync( testRoot + "genesis.json", JSON.stringify(existingGenesis) ) >>>>>>> let existingGenesis = JSON.parse( fs.readFileSync(testRoot + "genesis.json", "utf8") ) existingGenesis.genesis_time = new Date().toString() fs.writeFileSync( testRoot + "genesis.json", JSON.stringify(existingGenesis) ) <<<<<<< send = require('electron').send main = await require(appRoot + 'src/main/index.js') ======= main = await require(appRoot + "src/main/index.js") >>>>>>> send = require("electron").send main = await require(appRoot + "src/main/index.js") <<<<<<< it('should reconnect on IPC call', async () => { await registeredIPCListeners['reconnect']() ======= it("should reconnect on IPC call", async () => { const { send } = require("electron") await registeredIPCListeners["reconnect"]() >>>>>>> it("should reconnect on IPC call", async () => { await registeredIPCListeners["reconnect"]() <<<<<<< it('should search through nodes until it finds one', async () => { let axios = require('axios') axios.get = jest .fn() ======= it("should search through nodes until it finds one", async () => { const { send } = require("electron") let axios = require("axios") axios.get = jest .fn() >>>>>>> it("should search through nodes until it finds one", async () => { let axios = require("axios") axios.get = jest .fn() <<<<<<< it('should provide the connected node when the view has booted', async () => { main.shutdown() main = await require(appRoot + 'src/main/index.js') expect( send.mock.calls.find(([type, _]) => type === 'connected') ).toBeTruthy() expect( send.mock.calls.find(([type, _]) => type === 'connected')[1] ).toBeTruthy() // TODO fix seeds so we can test nodeIP output ======= it("should provide the connected node when the view has booted", async () => { let event = { sender: { send: jest.fn() } } registeredIPCListeners["booted"](event) expect(event.sender.send.mock.calls[0][0]).toEqual("connected") expect(event.sender.send.mock.calls[0][1]).toBeTruthy() // TODO fix seeds so we can test nodeIP output >>>>>>> it("should provide the connected node when the view has booted", async () => { main.shutdown() main = await require(appRoot + "src/main/index.js") expect( send.mock.calls.find(([type, _]) => type === "connected") ).toBeTruthy() expect( send.mock.calls.find(([type, _]) => type === "connected")[1] ).toBeTruthy() // TODO fix seeds so we can test nodeIP output <<<<<<< let { send } = require('electron') expect(send.mock.calls[0][0]).toEqual('error') expect(send.mock.calls[0][1]).toBeTruthy() // TODO fix seeds so we can test nodeIP output ======= let event = { sender: { send: jest.fn() } } registeredIPCListeners["booted"](event) expect(event.sender.send.mock.calls[0][0]).toEqual("error") expect(event.sender.send.mock.calls[0][1]).toBeTruthy() // TODO fix seeds so we can test nodeIP output }) it("should set error collection according to the error collection opt in state", async () => { main.shutdown() prepareMain() // register listeners again const { ipcMain } = require("electron") ipcMain.on = (type, cb) => { registeredIPCListeners[type] = cb } // run main main = await require(appRoot + "src/main/index.js") const Raven = require("raven") const ravenSpy = jest.spyOn(Raven, "config") registeredIPCListeners["error-collection"](null, true) expect(ravenSpy).toHaveBeenCalled() expect(ravenSpy.mock.calls[0]).not.toBe("") expect(ravenSpy.mock.calls).toMatchSnapshot() ravenSpy.mockClear() registeredIPCListeners["error-collection"](null, false) expect(ravenSpy).toHaveBeenCalledWith("", { captureUnhandledRejections: false }) >>>>>>> let { send } = require("electron") expect(send.mock.calls[0][0]).toEqual("error") expect(send.mock.calls[0][1]).toBeTruthy() // TODO fix seeds so we can test nodeIP output <<<<<<< let configText = fs.readFileSync(join(testRoot, 'config.toml'), 'utf8') configText = configText .split('\n') ======= let configText = fs.readFileSync(join(testRoot, "config.toml"), "utf8") configText = configText .split("\n") >>>>>>> let configText = fs.readFileSync(join(testRoot, "config.toml"), "utf8") configText = configText .split("\n") <<<<<<< }) .join('\n') fs.writeFileSync(join(testRoot, 'config.toml'), configText, 'utf8') ======= }) .join("\n") fs.writeFileSync(join(testRoot, "config.toml"), configText, "utf8") >>>>>>> }) .join("\n") fs.writeFileSync(join(testRoot, "config.toml"), configText, "utf8") <<<<<<< expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes('gaia') && args.includes('init') ======= expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes("gaia") && args.includes("init") >>>>>>> expect( childProcess.spawn.mock.calls.find( ([path, args]) => path.includes("gaia") && args.includes("init") <<<<<<< describe('Error handling on init', () => { testFailingChildProcess('gaia', 'init') testFailingChildProcess('gaia', 'rest-server') ======= describe("Error handling on init", () => { beforeEach(async function() { jest.resetModules() }) testFailingChildProcess("gaia", "init") >>>>>>> describe("Error handling on init", () => { testFailingChildProcess("gaia", "init") testFailingChildProcess("gaia", "rest-server") <<<<<<< function testFailingChildProcess (name, cmd) { return it(`should fail if there is a not handled error in the ${name} ${cmd || ''} process`, async function () { ======= function testFailingChildProcess(name, cmd) { return it(`should fail if there is a not handled error in the ${name} ${cmd || ""} process`, async function() { >>>>>>> function testFailingChildProcess(name, cmd) { return it(`should fail if there is a not handled error in the ${name} ${cmd || ""} process`, async function() { <<<<<<< if (type === 'exit') { if ( path.includes(mockName) && (mockCmd === undefined || args.find(x => x === mockCmd)) ) { ======= if (type === "exit") { if ( path.includes(mockName) && (mockCmd === undefined || args[1] === mockCmd) ) { >>>>>>> if (type === "exit") { if ( path.includes(mockName) && (mockCmd === undefined || args.find(x => x === mockCmd)) ) { <<<<<<< } else if (args.find(x => x === 'init')) { ======= } else if (args[1] === "init") { >>>>>>> } else if (args.find(x => x === "init")) { <<<<<<< stdin: { write: () => {} }, stdout: stdoutMocks(path, args), stderr: stderrMocks(path, args) ======= stdout: { on: (type, cb) => { if (args[0] === "version" && type === "data") { cb({ toString: () => "v0.5.0" }) } } }, stderr: { on: (type, cb) => { // test for init of gaia if (type === "data" && args[1] === "init" && args.length === 4) { cb({ toString: () => "already is initialized" }) } } } >>>>>>> stdin: { write: () => {} }, stdout: stdoutMocks(path, args), stderr: stderrMocks(path, args)
<<<<<<< node.get.delegation = jest.fn(() => ({ shares: `12` })) ======= node.getDelegations = jest.fn(() => [ { shares: `12`, validator_address: nodeMock.validators[0] } ]) >>>>>>> node.get.delegation = jest.fn(() => [ { shares: `12`, validator_address: nodeMock.validators[0] } ])
<<<<<<< ======= store.dispatch("showInitialScreen") >>>>>>> store.dispatch("showInitialScreen") <<<<<<< node.lcdConnected() .then(connected => { if (connected) { store.dispatch('showInitialScreen') ipcRenderer.send('successful-launch') } }) ======= node.lcdConnected().then(connected => { if (connected) { ipcRenderer.send("successful-launch") } }) >>>>>>> node.lcdConnected().then(connected => { if (connected) { ipcRenderer.send("successful-launch") } })
<<<<<<< function handleCrash(error) { mainWindow.webContents.send('error', error) ======= function handleCrash (error) { crashingError = error mainWindow.webContents.send('error', error) >>>>>>> function handleCrash (error) { crashingError = error mainWindow.webContents.send('error', error) <<<<<<< function createWindow() { ======= function createWindow () { >>>>>>> function createWindow () { <<<<<<< // start vue app mainWindow.loadURL(winURL + '?lcd_port=' + LCD_PORT) ======= mainWindow.loadURL(winURL + '?node=' + nodeIP + '&lcd_port=' + LCD_PORT) >>>>>>> // start vue app mainWindow.loadURL(winURL + '?lcd_port=' + LCD_PORT) <<<<<<< const { ipcMain } = require('electron') function handleIPC(seeds) { ipcMain.on('booted', () => { nodeIP = pickNode(seeds) // check if the lcd is initialized and if not intitialize it let _baseserverInitialized = await baseserverInitialized(join(root, 'baseserver')) console.log('Baseserver is', _baseserverInitialized ? '' : 'not', 'initialized') if (init || !_baseserverInitialized) { log(`Trying to initialize baseserver with remote node ${nodeIP}`) await initBaseserver(chainId, baseserverHome, nodeIP) } // connect to the node await connect(seeds, nodeIP) }) ipcMain.on('successful-launch', () => { console.log('[START SUCCESS] Vue app successfuly started') }) ipcMain.on('reconnect', (event) => { reconnect(seeds) }) } // check if LCD is initialized as the configs could be corrupted ======= function handleIPC () { ipcMain.on('successful-launch', () => { console.log('[START SUCCESS] Vue app successfuly started') }) ipcMain.on('reconnect', function (event) { return reconnect(seeds) }) ipcMain.on('booted', (event) => { // if the webcontent shows after we have connected to a node or produced, we need to send those events again if (crashingError) { event.sender.send('error', crashingError) } else if (!connecting && nodeIP) { event.sender.send('connected', nodeIP) } }) } // check if baseserver is initialized as the configs could be corrupted >>>>>>> function handleIPC () { ipcMain.on('successful-launch', () => { console.log('[START SUCCESS] Vue app successfuly started') }) ipcMain.on('reconnect', function (event) { return reconnect(seeds) }) ipcMain.on('booted', (event) => { // if the webcontent shows after we have connected to a node or produced, we need to send those events again if (crashingError) { event.sender.send('error', crashingError) } else if (!connecting && nodeIP) { event.sender.send('connected', nodeIP) } }) } // check if baseserver is initialized as the configs could be corrupted <<<<<<< // signal new node to view mainWindow.webContents.send('connected', nodeIP) ======= mainWindow.webContents.send('connected', nodeIP) connecting = false >>>>>>> mainWindow.webContents.send('connected', nodeIP) connecting = false // signal new node to view <<<<<<< let _lcdInitialized = await lcdInitialized(join(root, 'lcd')) console.log('LCD is', _lcdInitialized ? '' : 'not', 'initialized') if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) ======= let _baseserverInitialized = await baseserverInitialized(join(root, 'baseserver')) log('Baseserver is', _baseserverInitialized ? '' : 'not', 'initialized') if (init || !_baseserverInitialized) { log(`Trying to initialize baseserver with remote node ${nodeIP}`) await initBaseserver(chainId, baseserverHome, nodeIP) >>>>>>> let _lcdInitialized = await lcdInitialized(join(root, 'lcd')) console.log('LCD is', _lcdInitialized ? '' : 'not', 'initialized') if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP)
<<<<<<< await store.dispatch("signIn", { account: "default", password: "1234567890" }) ======= >>>>>>> await store.dispatch("signIn", { account: "default", password: "1234567890" }) <<<<<<< ======= store.commit("setDenoms", ["STEAK", "FERMION", "TEST"]) store.commit("setWalletAddress", "tb1zgatc3tdauv2m0uf") store.commit("setWalletBalances", [ { denom: "STEAK", amount: 123 }, { denom: "FERMION", amount: 456 } ]) store.commit("setCommittedDelegation", { candidateId: "cosmosvaladdr15ky9du8a2wlstz6fpx3p4mqpjyrm5ctqzh8yqw", value: 123 }) >>>>>>> <<<<<<< wrapper .find("#part-staked-balances .tm-li-dd") .text() .trim() ).toBe("14") ======= parseFloat( wrapper .find("#part-staked-balances .tm-li-dd") .text() .trim() ) ).toBe(123) >>>>>>> parseFloat( wrapper .find("#part-staked-balances .tm-li-dd") .text() .trim() ) ).toBe(14)
<<<<<<< if (!process.env.COSMOS_E2E_KEEP_OPEN) process.on('unhandledRejection', async error => { console.error('unhandledRejection', error) ======= process.on("unhandledRejection", async error => { console.error("unhandledRejection", error) >>>>>>> if (!process.env.COSMOS_E2E_KEEP_OPEN) process.on("unhandledRejection", async error => { console.error("unhandledRejection", error) <<<<<<< console.log('using binary', binary) // TODO cleanup home = newTempDir() cliHome = join(newTempDir(), 'lcd') console.error(`ui home: ${home}`) console.error(`node home: ${cliHome}`) ======= console.log("using binary", binary) // TODO cleanup home = newTempDir() cliHome = join(newTempDir(), "lcd") console.error(`ui home: ${home}`) console.error(`node home: ${cliHome}`) >>>>>>> console.log("using binary", binary) // TODO cleanup home = newTempDir() cliHome = join(newTempDir(), "lcd") console.error(`ui home: ${home}`) console.error(`node home: ${cliHome}`) <<<<<<< join(__dirname, '../../app/dist/main.js'), process.env.COSMOS_E2E_KEEP_OPEN ? '' : '--headless', '--disable-gpu', '--no-sandbox' ======= join(__dirname, "../../app/dist/main.js"), "--headless", "--disable-gpu", "--no-sandbox" >>>>>>> join(__dirname, "../../app/dist/main.js"), "--headless", "--disable-gpu", "--no-sandbox" <<<<<<< COSMOS_NODE: 'localhost', NODE_ENV: 'production', PREVIEW: 'true', COSMOS_DEVTOOLS: 0, // open devtools will cause issues with spectron, you can open them later manually COSMOS_HOME: home, COSMOS_NETWORK: 'test/e2e/localtestnet' ======= ANALYTICS: "false", COSMOS_NODE: "localhost", NODE_ENV: "production", PREVIEW: "true", COSMOS_DEVTOOLS: 0, // open devtools will cause issues with spectron, you can open them later manually COSMOS_HOME: home, COSMOS_NETWORK: "test/e2e/localtestnet" >>>>>>> COSMOS_NODE: "localhost", NODE_ENV: "production", PREVIEW: "true", COSMOS_DEVTOOLS: 0, // open devtools will cause issues with spectron, you can open them later manually COSMOS_HOME: home, COSMOS_NETWORK: "test/e2e/localtestnet" <<<<<<< ======= test.onFinish(() => (app ? app.stop() : null)) >>>>>>> <<<<<<< async function printAppLog(app) { await app.client.getMainProcessLogs().then(function (logs) { logs.forEach(function (log) { ======= function printAppLog(app) { app.client.getMainProcessLogs().then(function(logs) { logs.forEach(function(log) { >>>>>>> async function printAppLog(app) { await app.client.getMainProcessLogs().then(function(logs) { logs.forEach(function(log) { <<<<<<< await app.client.getRenderProcessLogs().then(function (logs) { logs.forEach(function (log) { ======= app.client.getRenderProcessLogs().then(function(logs) { logs.forEach(function(log) { >>>>>>> await app.client.getRenderProcessLogs().then(function(logs) { logs.forEach(function(log) { <<<<<<< await app.client.waitForExist('.ni-session', 5000) .catch(async e => { await printAppLog(app) throw e }) } ======= await app.client.waitForExist(".ni-session", 5000).catch(e => { printAppLog(app) throw e }) } >>>>>>> await app.client.waitForExist(".ni-session", 5000).catch(async e => { await printAppLog(app) throw e }) } <<<<<<< let child = spawn(binary, [ 'node', 'init', 'D0718DDFF62D301626B428A182F830CBB0AD21FC', '--home', cliHome, '--chain-id', 'localtestnet' ]) child.once('exit', (code) => { ======= let child = spawn(binary, [ "node", "init", "D0718DDFF62D301626B428A182F830CBB0AD21FC", "--home", cliHome, "--chain-id", "localtestnet" ]) child.once("exit", code => { >>>>>>> let child = spawn(binary, [ "node", "init", "D0718DDFF62D301626B428A182F830CBB0AD21FC", "--home", cliHome, "--chain-id", "localtestnet" ]) child.once("exit", code => { <<<<<<< let localnodeProcess = spawn(binary, [ 'node', 'start', '--home', cliHome ]) localnodeProcess.stderr.pipe(process.stderr) localnodeProcess.stdout.once('data', data => { ======= let localnodeProcess = spawn(binary, ["node", "start", "--home", cliHome]) localnodeProcess.stderr.pipe(process.stderr) localnodeProcess.stdout.once("data", data => { >>>>>>> let localnodeProcess = spawn(binary, ["node", "start", "--home", cliHome]) localnodeProcess.stderr.pipe(process.stderr) localnodeProcess.stdout.once("data", data => { <<<<<<< }) localnodeProcess.once('exit', (code) => { ======= }) localnodeProcess.once("exit", code => { >>>>>>> }) localnodeProcess.once("exit", code => { <<<<<<< restart: async function (app) { console.log('restarting app') ======= restart: async function(app) { console.log("restarting app") >>>>>>> restart: async function(app) { console.log("restarting app")
<<<<<<< COSMOS_ANALYTICS: 'false', LOGGING: 'false', ======= LOGGING: false, >>>>>>> LOGGING: 'false', <<<<<<< main = await require(appRoot + 'src/main/index.js') ======= resetModulesKeepingFS() let { send } = require('electron') main = await require(appRoot + 'src/main/index.js') >>>>>>> resetModulesKeepingFS() let { send } = require('electron') main = await require(appRoot + 'src/main/index.js') <<<<<<< prepareMain() let { send } = require('electron') ======= jest.resetModules() let { send } = require('electron') >>>>>>> prepareMain() let { send } = require('electron')
<<<<<<< import * as _Sentry from "@sentry/browser" import { ipcRenderer, remote } from "electron" ======= import * as Sentry from "@sentry/browser" >>>>>>> import * as _Sentry from "@sentry/browser" import axios from "axios" <<<<<<< /* istanbul ignore next */ Vue.config.errorHandler = (error, vm, info) => { console.error(`An error has occurred: ${error} Guru Meditation #${info}`) _Sentry.captureException(error) if (store.state.devMode) { throw error } } /* istanbul ignore next */ Vue.config.warnHandler = (msg, vm, trace) => { console.warn(`A warning has occurred: ${msg} Guru Meditation #${trace}`) if (store.state.devMode) { throw new Error(msg) } } Vue.use(Electron) Vue.use(Router) Vue.use(Tooltip, { delay: 1 }) Vue.use(Vuelidate) ======= // Sentry is used for automatic error reporting. It is turned off by default. Sentry.init({}) // this will pass the state to Sentry when errors are sent. // this would also sent passwords... // Sentry.configureScope(scope => { // scope.setExtra(_Store.state) // }) // handle uncaught errors window.addEventListener(`unhandledrejection`, function(event) { Sentry.captureException(event.reason) }) window.addEventListener(`error`, function(event) { Sentry.captureException(event.reason) }) _Vue.use(Router) _Vue.use(Tooltip, { delay: 1 }) _Vue.use(Vuelidate) >>>>>>> /* istanbul ignore next */ Vue.config.errorHandler = (error, vm, info) => { console.error(`An error has occurred: ${error} Guru Meditation #${info}`) _Sentry.captureException(error) if (store.state.devMode) { throw error } } /* istanbul ignore next */ Vue.config.warnHandler = (msg, vm, trace) => { console.warn(`A warning has occurred: ${msg} Guru Meditation #${trace}`) if (store.state.devMode) { throw new Error(msg) } } Vue.use(Router) Vue.use(Tooltip, { delay: 1 }) Vue.use(Vuelidate) // directive to focus form fields /* istanbul ignore next */ Vue.directive(`focus`, { inserted: function(el) { el.focus() } }) // add error handlers in production if (env.NODE_ENV === `production`) { // Sentry is used for automatic error reporting. It is turned off by default. Sentry.init({}) // this will pass the state to Sentry when errors are sent. // this would also sent passwords... // Sentry.configureScope(scope => { // scope.setExtra(_Store.state) // }) // handle uncaught errors /* istanbul ignore next */ window.addEventListener(`unhandledrejection`, function(event) { Sentry.captureException(event.reason) }) /* istanbul ignore next */ window.addEventListener(`error`, function(event) { Sentry.captureException(event.reason) }) } console.log(`Expecting stargate at: ${config.node_lcd}`) node = Node(axios, config.node_lcd) store = Store({ node }) router = new Router({ scrollBehavior: () => ({ y: 0 }), routes }) router.beforeEach((to, from, next) => { if (from.fullPath !== to.fullPath && !store.getters.user.pauseHistory) store.commit(`addHistory`, from.fullPath) next() }) store.dispatch(`connect`) store.dispatch(`showInitialScreen`) return new Vue({ router, ...App, store }).$mount(`#app`) } <<<<<<< /* istanbul ignore next */ Vue.directive(`focus`, { ======= _Vue.directive(`focus`, { >>>>>>> /* istanbul ignore next */ Vue.directive(`focus`, { <<<<<<< async function main(env = process.env, Sentry = _Sentry) { if (env.NODE_ENV === `production`) { // Sentry is used for automatic error reporting. It is turned off by default. Sentry.init({}) // this will pass the state to Sentry when errors are sent. // this would also sent passwords... // Sentry.configureScope(scope => { // scope.setExtra(_Store.state) // }) // handle uncaught errors /* istanbul ignore next */ window.addEventListener(`unhandledrejection`, function(event) { Sentry.captureException(event.reason) }) /* istanbul ignore next */ window.addEventListener(`error`, function(event) { Sentry.captureException(event.reason) }) } let lcdPort = config.development ? config.lcd_port : config.lcd_port_prod let localLcdURL = `https://localhost:${lcdPort}` console.log(`Expecting lcd-server on port: ` + lcdPort) ======= export async function main( Vue = _Vue, Node = _Node, Store = _Store, config = _config ) { console.log(`Expecting lcd-server at ` + config.node_lcd) >>>>>>> async function main( Node = _Node, Store = _Store, env = process.env, Sentry = _Sentry, Vue = _Vue, config = _config ) { let store let node let router /* istanbul ignore next */ Vue.config.errorHandler = (error, vm, info) => { console.error(`An error has occurred: ${error} Guru Meditation #${info}`) _Sentry.captureException(error) if (store.state.devMode) { throw error } } /* istanbul ignore next */ Vue.config.warnHandler = (msg, vm, trace) => { console.warn(`A warning has occurred: ${msg} Guru Meditation #${trace}`) if (store.state.devMode) { throw new Error(msg) } } Vue.use(Router) Vue.use(Tooltip, { delay: 1 }) Vue.use(Vuelidate) // directive to focus form fields /* istanbul ignore next */ Vue.directive(`focus`, { inserted: function(el) { el.focus() } }) // add error handlers in production if (env.NODE_ENV === `production`) { // Sentry is used for automatic error reporting. It is turned off by default. Sentry.init({}) // this will pass the state to Sentry when errors are sent. // this would also sent passwords... // Sentry.configureScope(scope => { // scope.setExtra(_Store.state) // }) // handle uncaught errors /* istanbul ignore next */ window.addEventListener(`unhandledrejection`, function(event) { Sentry.captureException(event.reason) }) /* istanbul ignore next */ window.addEventListener(`error`, function(event) { Sentry.captureException(event.reason) }) } console.log(`Expecting stargate at: ${config.node_lcd}`) <<<<<<< // run main() // exporting this for testing module.exports.store = store module.exports.node = node module.exports.router = router module.exports.main = main ======= main() >>>>>>> // run main()
<<<<<<< coinReducer, undelegationReducer, overviewReducer, metadataReducer ======= coinReducer, transactionReducer >>>>>>> coinReducer, undelegationReducer, overviewReducer, metadataReducer, transactionReducer <<<<<<< async getMetaData() { return metadataReducer(this.stakingDenom) } ======= async getTransactions(address) { const txs = await Promise.all([ this.get(`/txs?sender=${address}`), this.get(`/txs?recipient=${address}`), // this.get(`/txs?action=submit_proposal&proposer=${address}`), this.get(`/txs?action=deposit&depositor=${address}`), this.get(`/txs?action=vote&voter=${address}`), // this.get(`/txs?action=create_validator&destination-validator=${valAddress}`), // TODO // this.get(`/txs?action=edit_validator&destination-validator=${valAddress}`), // TODO this.get(`/txs?action=delegate&delegator=${address}`), this.get(`/txs?action=begin_redelegate&delegator=${address}`), this.get(`/txs?action=begin_unbonding&delegator=${address}`), // this.get(`/txs?action=unjail&source-validator=${address}`), // TODO // this.get(`/txs?action=set_withdraw_address&delegator=${address}`), // other this.get(`/txs?action=withdraw_delegator_reward&delegator=${address}`), this.get( `/txs?action=withdraw_validator_rewards_all&source-validator=${address}` ) ]).then(transactionGroups => [].concat(...transactionGroups)) const dupFreeTxs = uniqWith(txs, (a, b) => a.txhash === b.txhash) const sortedTxs = sortBy(dupFreeTxs, ['timestamp']) const reversedTxs = reverse(sortedTxs) return reversedTxs.map(transactionReducer) } >>>>>>> async getMetaData() { return metadataReducer(this.stakingDenom) } async getTransactions(address) { const txs = await Promise.all([ this.get(`/txs?sender=${address}`), this.get(`/txs?recipient=${address}`), // this.get(`/txs?action=submit_proposal&proposer=${address}`), this.get(`/txs?action=deposit&depositor=${address}`), this.get(`/txs?action=vote&voter=${address}`), // this.get(`/txs?action=create_validator&destination-validator=${valAddress}`), // TODO // this.get(`/txs?action=edit_validator&destination-validator=${valAddress}`), // TODO this.get(`/txs?action=delegate&delegator=${address}`), this.get(`/txs?action=begin_redelegate&delegator=${address}`), this.get(`/txs?action=begin_unbonding&delegator=${address}`), // this.get(`/txs?action=unjail&source-validator=${address}`), // TODO // this.get(`/txs?action=set_withdraw_address&delegator=${address}`), // other this.get(`/txs?action=withdraw_delegator_reward&delegator=${address}`), this.get( `/txs?action=withdraw_validator_rewards_all&source-validator=${address}` ) ]).then(transactionGroups => [].concat(...transactionGroups)) const dupFreeTxs = uniqWith(txs, (a, b) => a.txhash === b.txhash) const sortedTxs = sortBy(dupFreeTxs, ['timestamp']) const reversedTxs = reverse(sortedTxs) return reversedTxs.map(transactionReducer) }
<<<<<<< async getDelegates({ state, dispatch, commit, rootState }) { state.loading = true let delegates = await node.candidates() for (let delegate of delegates) { commit("addDelegate", delegate) } state.delegates = indicateValidators( state.delegates, rootState.config.maxValidators ======= async getDelegates({ state, dispatch, rootState, commit }) { commit("setDelegateLoading", true) let delegatePubkeys = (await node.candidates()).data await Promise.all( delegatePubkeys.map(pubkey => { return dispatch("getDelegate", pubkey) }) ) commit( "setDelegates", indicateValidators(state.delegates, rootState.config.maxValidators) >>>>>>> async getDelegates({ state, dispatch, commit, rootState }) { commit("setDelegateLoading", true) let delegates = await node.candidates() for (let delegate of delegates) { commit("addDelegate", delegate) } commit( "setDelegates", indicateValidators(state.delegates, rootState.config.maxValidators)
<<<<<<< 'use strict'; let { app, BrowserWindow, ipcMain } = require('electron') let fs = require('fs-extra') let { join } = require('path') let { spawn } = require('child_process') let home = require('user-home') let semver = require('semver') let toml = require('toml') let axios = require('axios') let Raven = require('raven') ======= "use strict" let { app, BrowserWindow, ipcMain } = require("electron") let fs = require("fs-extra") let { join } = require("path") let { spawn } = require("child_process") let home = require("user-home") let semver = require("semver") // this dependency is wrapped in a file as it was not possible to mock the import with jest any other way let event = require("event-to-promise") let toml = require("toml") let axios = require("axios") let Raven = require("raven") >>>>>>> "use strict" let { app, BrowserWindow, ipcMain } = require("electron") let fs = require("fs-extra") let { join } = require("path") let { spawn } = require("child_process") let home = require("user-home") let semver = require("semver") let toml = require("toml") let axios = require("axios") let Raven = require("raven") <<<<<<< const DEV = process.env.NODE_ENV === 'development'; const TEST = process.env.NODE_ENV === 'testing'; ======= const DEV = process.env.NODE_ENV === "development" const TEST = process.env.NODE_ENV === "testing" >>>>>>> const DEV = process.env.NODE_ENV === "development" const TEST = process.env.NODE_ENV === "testing" <<<<<<< function sleep (ms) { return new Promise(resolve => setTimeout(resolve, ms)) ======= function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) >>>>>>> function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)) <<<<<<< function handleCrash (error) { afterBooted(() => { mainWindow.webContents.send('error', error) }) ======= function handleCrash(error) { crashingError = error mainWindow.webContents.send("error", error) >>>>>>> function handleCrash(error) { afterBooted(() => { mainWindow.webContents.send("error", error) }) <<<<<<< // start vue app mainWindow.loadURL(winURL + '?lcd_port=' + LCD_PORT) ======= mainWindow.loadURL(winURL + "?node=" + nodeIP + "&lcd_port=" + LCD_PORT) >>>>>>> // start vue app mainWindow.loadURL(winURL + "?lcd_port=" + LCD_PORT) <<<<<<< let argString = args.map(arg => JSON.stringify(arg)).join(' ') ======= let argString = args.map(arg => JSON.stringify(arg)).join(" ") >>>>>>> let argString = args.map(arg => JSON.stringify(arg)).join(" ") <<<<<<< child.stdout.on('data', data => !shuttingDown && log(`${name}: ${data}`)) child.stderr.on('data', data => !shuttingDown && log(`${name}: ${data}`)) child.on( 'exit', code => !shuttingDown && log(`${name} exited with code ${code}`) ) child.on('error', async function (err) { if (!(shuttingDown && err.code === 'ECONNRESET')) { ======= child.stdout.on("data", data => !shuttingDown && log(`${name}: ${data}`)) child.stderr.on("data", data => !shuttingDown && log(`${name}: ${data}`)) child.on( "exit", code => !shuttingDown && log(`${name} exited with code ${code}`) ) child.on("error", async function(err) { if (!(shuttingDown && err.code === "ECONNRESET")) { await new Promise(resolve => Raven.captureException(err, resolve)) >>>>>>> child.stdout.on("data", data => !shuttingDown && log(`${name}: ${data}`)) child.stderr.on("data", data => !shuttingDown && log(`${name}: ${data}`)) child.on( "exit", code => !shuttingDown && log(`${name} exited with code ${code}`) ) child.on("error", async function(err) { if (!(shuttingDown && err.code === "ECONNRESET")) { <<<<<<< console.error( '[Uncaught Exception] Child', name, 'produced an unhandled exception:', err ) ======= console.error( "[Uncaught Exception] Child", name, "produced an unhandled exception:", err ) >>>>>>> console.error( "[Uncaught Exception] Child", name, "produced an unhandled exception:", err ) <<<<<<< async function getGaiaVersion () { let child = startProcess(SERVER_BINARY, ['version']) let data = await new Promise(resolve => { child.stdout.on('data', resolve) ======= async function getGaiaVersion() { let child = startProcess(SERVER_BINARY, ["version"]) let data = await new Promise(resolve => { child.stdout.on("data", resolve) >>>>>>> async function getGaiaVersion() { let child = startProcess(SERVER_BINARY, ["version"]) let data = await new Promise(resolve => { child.stdout.on("data", resolve) <<<<<<< mainLog.write(`main-process: ${args.join(' ')}\r\n`) }; ======= mainLog.write(`main-process: ${args.join(" ")}\r\n`) } >>>>>>> mainLog.write(`main-process: ${args.join(" ")}\r\n`) } <<<<<<< mainLog.write(`main-process: ${args.join(' ')}\r\n`) }; ======= mainLog.write(`main-process: ${args.join(" ")}\r\n`) } >>>>>>> mainLog.write(`main-process: ${args.join(" ")}\r\n`) } <<<<<<< function consistentConfigDir ( appVersionPath, genesisPath, configPath, gaiaVersionPath ) { return ( exists(genesisPath) && ======= function consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) { return ( exists(genesisPath) && >>>>>>> function consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) { return ( exists(genesisPath) && <<<<<<< 'client', 'init', '--home', home ======= "client", "init", "--home", home >>>>>>> "client", "init", "--home", home <<<<<<< nodeAlive = await axios .get('http://' + nodeIP, { timeout: 3000 }) ======= nodeAlive = await axios .get("http://" + nodeIP, { timeout: 3000 }) >>>>>>> nodeAlive = await axios .get("http://" + nodeIP, { timeout: 3000 }) <<<<<<< log( `${new Date().toLocaleTimeString()} ${nodeIP} is ${ nodeAlive ? 'alive' : 'down' }` ) ======= log( `${new Date().toLocaleTimeString()} ${nodeIP} is ${ nodeAlive ? "alive" : "down" }` ) >>>>>>> log( `${new Date().toLocaleTimeString()} ${nodeIP} is ${ nodeAlive ? "alive" : "down" }` ) <<<<<<< if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, 'utf8').trim() let compatible = semver.diff(existingVersion, pkg.version) !== 'major'; ======= if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" >>>>>>> if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" <<<<<<< if (genesisJSON.chain_id !== 'local') { let specifiedGenesis = fs.readFileSync( join(networkPath, 'genesis.json'), 'utf8' ) ======= if (genesisJSON.chain_id !== "local") { let specifiedGenesis = fs.readFileSync( join(networkPath, "genesis.json"), "utf8" ) >>>>>>> if (genesisJSON.chain_id !== "local") { let specifiedGenesis = fs.readFileSync( join(networkPath, "genesis.json"), "utf8" ) <<<<<<< let _lcdInitialized = await lcdInitialized(join(root, 'lcd')) log('LCD is' + (_lcdInitialized ? '' : ' not') + ' initialized') ======= let _lcdInitialized = await lcdInitialized(join(root, "lcd")) console.log("LCD is", _lcdInitialized ? "" : "not", "initialized") >>>>>>> let _lcdInitialized = await lcdInitialized(join(root, "lcd")) log("LCD is" + (_lcdInitialized ? "" : " not") + " initialized") <<<<<<< ======= console.log("connecting") >>>>>>>
<<<<<<< const delegation = require('renderer/vuex/modules/delegation').default({}) const delegates = require('renderer/vuex/modules/delegates').default({}) const localVue = createLocalVue() localVue.use(Vuex) ======= >>>>>>> <<<<<<< store = new Vuex.Store({ getters: { shoppingCart: () => delegation.state.delegates, delegates: () => delegates.state, config: () => ({ devMode: true }) }, modules: { delegation, delegates ======= let test = instance.mount(LiDelegate, { propsData: { delegate: {} >>>>>>> let test = instance.mount(LiDelegate, { propsData: { delegate: { description: {} }
<<<<<<< from: address, password: `12345` ======= from: `cosmos15ky9du8a2wlstz6fpx3p4mqpjyrm5ctpesxxn9`, password: `12345` >>>>>>> from: address, password: `12345` <<<<<<< [ `submitRedelegation`, { password: `12345`, validatorSrc: validator, validatorDst: validatorTo, amount: 5 } ] ======= [`submitDelegation`, { password: `12345`, stakingTransactions }] >>>>>>> [ `submitRedelegation`, { password: `12345`, validatorSrc: validator, validatorDst: validatorTo, amount: 5 } ] <<<<<<< [ `submitRedelegation`, { password: `12345`, validatorSrc: validator, validatorDst: validatorTo, amount: 5 } ] ======= [`submitDelegation`, { stakingTransactions, password: `12345` }] >>>>>>> [ `submitRedelegation`, { password: `12345`, validatorSrc: validator, validatorDst: validatorTo, amount: 5 } ] <<<<<<< body: `You have successfully undelegated 10 atoms.`, title: `Successful undelegation!` ======= body: `You have successfully undelegated 10 ${ stakingParameters.parameters.bond_denom }s.`, title: `Successful Undelegation!` >>>>>>> body: `You have successfully undelegated 10 ${ stakingParameters.parameters.bond_denom }s.`, title: `Successful undelegation!` <<<<<<< password: `12345`, amount: 10 ======= amount: 10, password: `12345` >>>>>>> password: `12345`, amount: 10
<<<<<<< nodes = _.uniq( configTOML.p2p.persistent_peers .split(",") .filter(x => x !== "") .map(x => x.split("@")[1]) ) if (nodes.length === 0) { ======= seeds = (configTOML.p2p.persistent_peers + "," + configTOML.p2p.seeds) .split(",") .filter(x => x !== "") .map(x => (x.indexOf("@") !== -1 ? x.split("@")[1] : x)) if (seeds.length === 0) { >>>>>>> nodes = _.uniq( (configTOML.p2p.persistent_peers + "," + configTOML.p2p.seeds) .split(",") .filter(x => x !== "") .map(x => (x.indexOf("@") !== -1 ? x.split("@")[1] : x)) ) if (nodes.length === 0) {
<<<<<<< Vue.set( state.committedDelegates, validator_addr, state.committedDelegates[validator_addr] + amount ) // load delegates after delegation to get new atom distribution on validators dispatch(`updateDelegates`) ======= commit(`setCommittedDelegation`, { candidateId: validator_addr, value: state.committedDelegates[validator_addr] + amount }) dispatch(`updateDelegates`) >>>>>>> commit(`setCommittedDelegation`, { candidateId: validator_addr, value: state.committedDelegates[validator_addr] + amount }) // load delegates after delegation to get new atom distribution on validators dispatch(`updateDelegates`)
<<<<<<< // after importing the @tendermint/ui components modules // the perfect scroll plugin needs a $nextTick and a wrapper.update // to work properly in the tests (snapshots weren't matching) // this has occured across multiple tests store.commit(`setStakingParameters`, stakingParameters.parameters) await wrapper.vm.$nextTick() wrapper.update() ======= >>>>>>> store.commit(`setStakingParameters`, stakingParameters.parameters)
<<<<<<< store.commit("setDenoms", ["STEAK", "FERMION", "TEST"]) ======= store.commit("setConnected", true) store.commit("setDenoms", ["ATOM", "FERMION", "TEST"]) >>>>>>> store.commit("setConnected", true) store.commit("setDenoms", ["STEAK", "FERMION", "TEST"])
<<<<<<< vote(networkId: String!, proposalId: Int!, address: String!): Vote governanceParameters(networkId: String!): GovernanceParameters validator(networkId: String!, operatorAddress: String!): Validator ======= >>>>>>> <<<<<<< ======= vote(networkId: String!, proposalId: Int!, address: String!): Vote governanceParameters(networkId: String!): GovernanceParameters validator(networkId: String!, operatorAddress: String!): Validator >>>>>>> vote(networkId: String!, proposalId: Int!, address: String!): Vote governanceParameters(networkId: String!): GovernanceParameters validator(networkId: String!, operatorAddress: String!): Validator <<<<<<< metaData(networkId: String!): MetaData ======= transactions(networkId: String!, address: String!): [Transaction] >>>>>>> metaData(networkId: String!): MetaData transactions(networkId: String!, address: String!): [Transaction]
<<<<<<< let test = instance.shallow(null) store = test.store store.commit(`setConnected`, true) }) it(`should have no parameters by default`, () => { expect(store.state.parameters.parameters).toEqual({}) ======= node = { getStakingParameters: () => Promise.resolve(stakingParameters) } module = parametersModule({ node }) >>>>>>> let test = instance.shallow(null) store = test.store store.commit(`setConnected`, true) }) it(`should have no parameters by default`, () => { expect(store.state.parameters.parameters).toEqual({}) node = { getStakingParameters: () => Promise.resolve(stakingParameters) } module = parametersModule({ node })
<<<<<<< txs: function(addr) { return Promise.all([ req("GET", `/txs?tag=sender_bech32='${addr}'`).call(this), req("GET", `/txs?tag=recipient_bech32='${addr}'`).call(this) ]).then(([senderTxs, recipientTxs]) => [].concat(senderTxs, recipientTxs)) }, ======= >>>>>>> txs: function(addr) { return Promise.all([ req("GET", `/txs?tag=sender_bech32='${addr}'`).call(this), req("GET", `/txs?tag=recipient_bech32='${addr}'`).call(this) ]).then(([senderTxs, recipientTxs]) => [].concat(senderTxs, recipientTxs)) },
<<<<<<< let chainId ======= let booted = false >>>>>>> let chainId let booted = false <<<<<<< crashingError = error if (mainWindow) { mainWindow.webContents.send("error", error) } ======= afterBooted(() => { if (mainWindow) { mainWindow.webContents.send("error", error) } }) >>>>>>> afterBooted(() => { if (mainWindow) { mainWindow.webContents.send("error", error) } }) <<<<<<< log("startLCD", home) let child = startProcess(SERVER_BINARY, [ "rest-server", "--laddr", `tcp://localhost:${LCD_PORT}`, "--home", home, "--node", nodeIP, "--chain-id", chainId // '--trust-node' ]) logProcess(child, join(home, "lcd.log")) while (true) { if (shuttingDown) break let data = await event(child.stdout, "data") if (data.toString().includes("Starting RPC HTTP server")) break } ======= return new Promise((resolve, reject) => { log("startLCD", home) let child = startProcess(SERVER_BINARY, [ "rest-server", "--port", LCD_PORT, "--home", home, "--node", nodeIP // '--trust-node' ]) logProcess(child, join(home, "lcd.log")) >>>>>>> return new Promise((resolve, reject) => { log("startLCD", home) let child = startProcess(SERVER_BINARY, [ "rest-server", "--laddr", `tcp://localhost:${LCD_PORT}`, "--home", home, "--node", nodeIP, "--chain-id", chainId // '--trust-node' ]) logProcess(child, join(home, "lcd.log")) <<<<<<< // fs.ensureDirSync(home) // `basecli client init` to generate config, trust seed let child = startProcess(SERVER_BINARY, [ "init", "--home", home, "--chain-id", chainId, "--node", node // '--trust-node' ]) child.stdout.on("data", data => { let hashMatch = /\w{40}/g.exec(data) if (hashMatch) { log("approving hash", hashMatch[0]) if (shuttingDown) return // answer 'y' to the prompt about trust seed. we can trust this is correct // since the LCD is talking to our own full node child.stdin.write("y\n") } ======= // let the user in the view approve the hash we get from the node return new Promise((resolve, reject) => { // `gaia client init` to generate config let child = startProcess(SERVER_BINARY, [ "client", "init", "--home", home, "--chain-id", chainId, "--node", node ]) child.stdout.on("data", async data => { let hashMatch = /\w{40}/g.exec(data) if (hashMatch) { handleHashVerification(hashMatch[0]) .then( async () => { log("approved hash", hashMatch[0]) if (shuttingDown) return // answer 'y' to the prompt about trust seed. we can trust this is correct // since the LCD is talking to our own full node child.stdin.write("y\n") expectCleanExit(child, "gaia init exited unplanned").then( resolve, reject ) }, () => { // kill process as we will spin up a new init process child.kill("SIGTERM") if (shuttingDown) return // select a new node to try out nodeIP = pickNode(seeds) initLCD(chainId, home, nodeIP).then(resolve, reject) } ) .catch(reject) // execute after registering handlers via handleHashVerification so that in the synchronous test they are available to answer the request afterBooted(() => { mainWindow.webContents.send("approve-hash", hashMatch[0]) }) } }) >>>>>>> // let the user in the view approve the hash we get from the node return new Promise((resolve, reject) => { // `gaia client init` to generate config let child = startProcess(SERVER_BINARY, [ "client", "init", "--home", home, "--chain-id", chainId, "--node", node ]) child.stdout.on("data", async data => { let hashMatch = /\w{40}/g.exec(data) if (hashMatch) { handleHashVerification(hashMatch[0]) .then( async () => { log("approved hash", hashMatch[0]) if (shuttingDown) return // answer 'y' to the prompt about trust seed. we can trust this is correct // since the LCD is talking to our own full node child.stdin.write("y\n") expectCleanExit(child, "gaia init exited unplanned").then( resolve, reject ) }, () => { // kill process as we will spin up a new init process child.kill("SIGTERM") if (shuttingDown) return // select a new node to try out nodeIP = pickNode(seeds) initLCD(chainId, home, nodeIP).then(resolve, reject) } ) .catch(reject) // execute after registering handlers via handleHashVerification so that in the synchronous test they are available to answer the request afterBooted(() => { mainWindow.webContents.send("approve-hash", hashMatch[0]) }) } }) <<<<<<< let _lcdInitialized = true // await lcdInitialized(join(root, 'lcd')) console.log("LCD is", _lcdInitialized ? "" : "not", "initialized") ======= let _lcdInitialized = await lcdInitialized(join(root, "lcd")) log("LCD is" + (_lcdInitialized ? "" : " not") + " initialized") >>>>>>> let _lcdInitialized = true // await lcdInitialized(join(root, 'lcd')) log("LCD is" + (_lcdInitialized ? "" : "not") + "initialized")
<<<<<<< import { Yajinni, Mamtooth, Zerotorescue, Putro, joshinator, Gebuz, ackwell, emallson, blazyb, Dambroda, Nalhan, Satyric, niseko, Khadaj, Fyruna, Matardarix, jos3p, Aelexe, Chizu, Hartra344, Hordehobbs, Dorixius, Sharrq, Scotsoo, HolySchmidt, Zeboot, Abelito75, Anatta336, HawkCorrigan, Amrux, Qbz, fluffels } from 'CONTRIBUTORS'; ======= import { Yajinni, Mamtooth, Zerotorescue, Putro, joshinator, Gebuz, ackwell, emallson, blazyb, Dambroda, Nalhan, Satyric, niseko, Khadaj, Fyruna, Matardarix, jos3p, Aelexe, Chizu, Hartra344, Hordehobbs, Dorixius, Sharrq, Scotsoo, HolySchmidt, Zeboot, Abelito75, Anatta336, HawkCorrigan, Amrux, Qbz, Viridis, Juko8 } from 'CONTRIBUTORS'; >>>>>>> import { Yajinni, Mamtooth, Zerotorescue, Putro, joshinator, Gebuz, ackwell, emallson, blazyb, Dambroda, Nalhan, Satyric, niseko, Khadaj, Fyruna, Matardarix, jos3p, Aelexe, Chizu, Hartra344, Hordehobbs, Dorixius, Sharrq, Scotsoo, HolySchmidt, Zeboot, Abelito75, Anatta336, HawkCorrigan, Amrux, Qbz, Viridis, Juko8, fluffels } from 'CONTRIBUTORS'; <<<<<<< change(date(2019, 9, 6), 'Remove references to deprecated React lifecycle methods.', fluffels), ======= change(date(2019, 10, 13), <>Added extra information and cleaned up Vantus Rune infographic. />.</>, Abelito75), change(date(2019, 10, 13), <>Added <ItemLink id={ITEMS.RAZOR_CORAL.id} />.</>, Zeboot), change(date(2019, 10, 13), 'Added event filter to cooldown to view only events during a selected cooldown.', Zeboot), change(date(2019, 10, 13), <>Added <ItemLink id={ITEMS.BLOODTHIRSTY_URCHIN.id} />.</>, Zeboot), change(date(2019, 10, 13), <>Added <ItemLink id={ITEMS.DRIBBLING_INKPOD.id} />.</>, Zeboot), change(date(2019, 10, 2), <>Added Potion of Empowered Proximity for the potion checker.</>, Abelito75), change(date(2019, 10, 2), <>Fixed an issue in Cast Efficiency that caused spells to have a time on CD higher than 100%.</>, Sharrq), change(date(2019, 9, 30), <>Adjusted phase transitions for Orgozoa, Za'qul, and Queen Azshara to be more accurate.</>, Sharrq), change(date(2019, 9, 20), <>Added <ItemLink id={ITEMS.CYCLOTRONIC_BLAST.id} />.</>, Juko8), change(date(2019, 9, 20), 'Added 8.2 gems', Juko8), change(date(2019, 9, 16), <>Changed how cast efficiency is tracked for spells with charges <em>and</em> charge refunds (mostly <SpellLink id={SPELLS.JUDGMENT_CAST_PROTECTION.id} />).</>, emallson), change(date(2019, 9, 11), 'Fight statistics in the character panel now include the most used essences.', niseko), change(date(2019, 9, 10), 'Added a cast time column to the mana efficiency module.', niseko), change(date(2019, 9, 9), <>Added <ItemLink id={ITEMS.POTION_OF_FOCUSED_RESOLVE.id} />.</>, Sharrq), change(date(2019, 9, 8), <>Fixed issue with <ItemLink id={ITEMS.ENCHANT_WEAPON_FORCE_MULTIPLIER.id} /> and Critical Strike.</>, emallson), change(date(2019, 9, 7), <>Added <ItemLink id={ITEMS.ENCHANT_WEAPON_FORCE_MULTIPLIER.id} /></>, emallson), >>>>>>> change(date(2019, 10, 13), <>Added extra information and cleaned up Vantus Rune infographic. />.</>, Abelito75), change(date(2019, 10, 13), <>Added <ItemLink id={ITEMS.RAZOR_CORAL.id} />.</>, Zeboot), change(date(2019, 10, 13), 'Added event filter to cooldown to view only events during a selected cooldown.', Zeboot), change(date(2019, 10, 13), <>Added <ItemLink id={ITEMS.BLOODTHIRSTY_URCHIN.id} />.</>, Zeboot), change(date(2019, 10, 13), <>Added <ItemLink id={ITEMS.DRIBBLING_INKPOD.id} />.</>, Zeboot), change(date(2019, 10, 2), <>Added Potion of Empowered Proximity for the potion checker.</>, Abelito75), change(date(2019, 10, 2), <>Fixed an issue in Cast Efficiency that caused spells to have a time on CD higher than 100%.</>, Sharrq), change(date(2019, 9, 30), <>Adjusted phase transitions for Orgozoa, Za'qul, and Queen Azshara to be more accurate.</>, Sharrq), change(date(2019, 9, 20), <>Added <ItemLink id={ITEMS.CYCLOTRONIC_BLAST.id} />.</>, Juko8), change(date(2019, 9, 20), 'Added 8.2 gems', Juko8), change(date(2019, 9, 16), <>Changed how cast efficiency is tracked for spells with charges <em>and</em> charge refunds (mostly <SpellLink id={SPELLS.JUDGMENT_CAST_PROTECTION.id} />).</>, emallson), change(date(2019, 9, 11), 'Fight statistics in the character panel now include the most used essences.', niseko), change(date(2019, 9, 10), 'Added a cast time column to the mana efficiency module.', niseko), change(date(2019, 9, 9), <>Added <ItemLink id={ITEMS.POTION_OF_FOCUSED_RESOLVE.id} />.</>, Sharrq), change(date(2019, 9, 8), <>Fixed issue with <ItemLink id={ITEMS.ENCHANT_WEAPON_FORCE_MULTIPLIER.id} /> and Critical Strike.</>, emallson), change(date(2019, 9, 7), <>Added <ItemLink id={ITEMS.ENCHANT_WEAPON_FORCE_MULTIPLIER.id} /></>, emallson), change(date(2019, 9, 6), 'Remove references to deprecated React lifecycle methods.', fluffels),
<<<<<<< ======= async getAllProposals() { const response = await this.get('gov/proposals') return Array.isArray(response) ? response.map(proposal => proposalReducer(proposal)) : [] } async getValidatorSigningInfo(validatorConsensusPubKey) { try { const exceptions = [ `cosmosvalconspub1zcjduepqx38v580cmd9em3n7mcgzj22jwdwks5lr3lfxl8g87vzjp7jyyszsr4xvzv`, `cosmosvalconspub1zcjduepqlzmd0spn9m0m3eq9zp93d4w6e5tugamv44yqjzyacelnvra634fqnfec0r` ] if (exceptions.indexOf(validatorConsensusPubKey) !== -1) { console.log(`Ignore Validator ${validatorConsensusPubKey}`) throw Error() } const response = await this.get( `slashing/validators/${validatorConsensusPubKey}/signing_info` ) return response } catch (e) { return { missed_blocks_counter: '0', start_height: '0' } } } async getAllValidatorSets() { const response = await this.get(`validatorsets/latest`) return response } >>>>>>> async getValidatorSigningInfo(validatorConsensusPubKey) { try { const exceptions = [ `cosmosvalconspub1zcjduepqx38v580cmd9em3n7mcgzj22jwdwks5lr3lfxl8g87vzjp7jyyszsr4xvzv`, `cosmosvalconspub1zcjduepqlzmd0spn9m0m3eq9zp93d4w6e5tugamv44yqjzyacelnvra634fqnfec0r` ] if (exceptions.indexOf(validatorConsensusPubKey) !== -1) { console.log(`Ignore Validator ${validatorConsensusPubKey}`) throw Error() } const response = await this.get( `slashing/validators/${validatorConsensusPubKey}/signing_info` ) return response } catch (e) { return { missed_blocks_counter: '0', start_height: '0' } } } async getAllValidatorSets() { const response = await this.get(`validatorsets/latest`) return response }
<<<<<<< if (!MOCK) { log(`starting gaiacli server with nodeIP ${nodeIP}`) lcdProcess = await startLCD(lcdHome, nodeIP) log("gaiacli server ready") } ======= log(`starting gaia server with nodeIP ${nodeIP}`) lcdProcess = await startLCD(lcdHome, nodeIP) log("gaia server ready") >>>>>>> log(`starting gaiacli server with nodeIP ${nodeIP}`) lcdProcess = await startLCD(lcdHome, nodeIP) log("gaiacli server ready") <<<<<<< if (!MOCK) { let init = true if (rootExists) { log(`root exists (${root})`) // NOTE: when changing this code, always make sure the app can never // overwrite/delete existing data without at least backing it up, // since it may contain the user's private keys and they might not // have written down their seed words. // they might get pretty mad if the app deletes their money! // check if the existing data came from a compatible app version // if not, fail with an error if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiacliVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" if (compatible) { log("configs are compatible with current app version") init = false } else { // TODO: versions of the app with different data formats will need to learn how to // migrate old data throw Error(`Data was created with an incompatible app version data=${existingVersion} app=${pkg.version}`) } ======= let init = true if (rootExists) { log(`root exists (${root})`) // NOTE: when changing this code, always make sure the app can never // overwrite/delete existing data without at least backing it up, // since it may contain the user's private keys and they might not // have written down their seed words. // they might get pretty mad if the app deletes their money! // check if the existing data came from a compatible app version // if not, fail with an error if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiaVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" if (compatible) { log("configs are compatible with current app version") init = false >>>>>>> let init = true if (rootExists) { log(`root exists (${root})`) // NOTE: when changing this code, always make sure the app can never // overwrite/delete existing data without at least backing it up, // since it may contain the user's private keys and they might not // have written down their seed words. // they might get pretty mad if the app deletes their money! // check if the existing data came from a compatible app version // if not, fail with an error if ( consistentConfigDir( appVersionPath, genesisPath, configPath, gaiacliVersionPath ) ) { let existingVersion = fs.readFileSync(appVersionPath, "utf8").trim() let compatible = semver.diff(existingVersion, pkg.version) !== "major" if (compatible) { log("configs are compatible with current app version") init = false <<<<<<< let _lcdInitialized = true // await lcdInitialized(join(root, 'lcd')) log("LCD is" + (_lcdInitialized ? "" : "not") + "initialized") if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) } ======= let _lcdInitialized = await lcdInitialized(join(root, "lcd")) log("LCD is" + (_lcdInitialized ? "" : " not") + " initialized") if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP) >>>>>>> let _lcdInitialized = true // await lcdInitialized(join(root, 'lcd')) log("LCD is" + (_lcdInitialized ? "" : "not") + "initialized") if (init || !_lcdInitialized) { log(`Trying to initialize lcd with remote node ${nodeIP}`) await initLCD(chainId, lcdHome, nodeIP)
<<<<<<< expect(node.send).toHaveBeenCalledWith(`mock_address`, { amount: [{ amount: 123, denom: `uatom` }], password: `1234567890`, base_req: { account_number: `12`, chain_id: `mock-chain`, from: `cosmos1demo`, gas, sequence: `0`, memo: `(Sent via Lunie)`, gas_prices, simulate: false } }) ======= expect(node.send).toHaveBeenCalledWith(`mock_address`, { amount: [{ amount: 123, denom: `uatom` }], password: `1234567890`, base_req: { account_number: `12`, chain_id: `mock-chain`, from: `cosmos1demo`, gas, sequence: `0`, memo: `Sent via Lunie`, gas_prices, simulate: false } }) >>>>>>> expect(node.send).toHaveBeenCalledWith(`mock_address`, { amount: [{ amount: 123, denom: `uatom` }], password: `1234567890`, base_req: { account_number: `12`, chain_id: `mock-chain`, from: `cosmos1demo`, gas, sequence: `0`, memo: `(Sent via Lunie)`, gas_prices, simulate: false } }) <<<<<<< expect(node.send).toHaveBeenCalledWith(`mock_address`, `cosmosvaloper1address`, { amount: [{ amount: 123, denom: `uatom` }], password: `1234567890`, base_req: { account_number: `12`, chain_id: `mock-chain`, from: `cosmos1demo`, gas, sequence: `0`, memo: `(Sent via Lunie)`, gas_prices, simulate: false ======= expect(node.send).toHaveBeenCalledWith( `mock_address`, `cosmosvaloper1address`, { amount: [{ amount: 123, denom: `uatom` }], password: `1234567890`, base_req: { account_number: `12`, chain_id: `mock-chain`, from: `cosmos1demo`, gas, sequence: `0`, memo: `Sent via Lunie`, gas_prices, simulate: false } >>>>>>> expect(node.send).toHaveBeenCalledWith( `mock_address`, `cosmosvaloper1address`, { amount: [{ amount: 123, denom: `uatom` }], password: `1234567890`, base_req: { account_number: `12`, chain_id: `mock-chain`, from: `cosmos1demo`, gas, sequence: `0`, memo: `(Sent via Lunie)`, gas_prices, simulate: false }
<<<<<<< this.state = { isReady: false } this.scrollHandler = _.debounce(this.handleScroll.bind(this), 100, { leading: false, trailing: true }) this.changeHandler = e => this.handleChange(e) ======= this.scrollHandler = _.debounce(this.handleScroll.bind(this), 100, {leading: false, trailing: true}) this.changeHandler = (editor, changeObject) => this.handleChange(editor, changeObject) >>>>>>> this.state = { isReady: false } this.scrollHandler = _.debounce(this.handleScroll.bind(this), 100, { leading: false, trailing: true }) this.changeHandler = (editor, changeObject) => this.handleChange(editor, changeObject) <<<<<<< this.formatTable = () => this.handleFormatTable() ======= this.contextMenuHandler = function (editor, event) { const menu = buildEditorContextMenu(editor, event) if (menu != null) { setTimeout(() => menu.popup(remote.getCurrentWindow()), 30) } } >>>>>>> this.formatTable = () => this.handleFormatTable() this.contextMenuHandler = function (editor, event) { const menu = buildEditorContextMenu(editor, event) if (menu != null) { setTimeout(() => menu.popup(remote.getCurrentWindow()), 30) } } <<<<<<< this.setState({ isReady: true }) this.tableEditor = new TableEditor(new TextEditorInterface(this.editor)) eventEmitter.on('code:format-table', this.formatTable) ======= if (this.props.spellCheck) { this.editor.addPanel(this.createSpellCheckPanel(), {position: 'bottom'}) } >>>>>>> this.setState({ isReady: true }) this.tableEditor = new TableEditor(new TextEditorInterface(this.editor)) if (this.props.spellCheck) { this.editor.addPanel(this.createSpellCheckPanel(), {position: 'bottom'}) } eventEmitter.on('code:format-table', this.formatTable) <<<<<<< eventEmitter.off('code:format-table', this.formatTable) ======= spellcheck.setLanguage(null, spellcheck.SPELLCHECK_DISABLED) >>>>>>> spellcheck.setLanguage(null, spellcheck.SPELLCHECK_DISABLED) eventEmitter.off('code:format-table', this.formatTable) <<<<<<< const newCursor = Object.assign({}, cursor, { ch: cursor.ch + newValue.length - value.length }) ======= const newCursor = Object.assign({}, cursor, {ch: cursor.ch + newValue.length - value.length}) >>>>>>> const newCursor = Object.assign({}, cursor, { ch: cursor.ch + newValue.length - value.length })
<<<<<<< rpcConnect: () => { }, ======= rpcInfo: { connected: true, connecting: false, nodeIP: '127.0.0.1' }, initRPC: () => {}, >>>>>>> rpcInfo: { connected: true, connecting: false, nodeIP: '127.0.0.1' }, rpcConnect: () => { },
<<<<<<< store = instance.store store.commit(`setStakingParameters`, stakingParameters.parameters) wrapper.update() ======= >>>>>>> store = instance.store store.commit(`setStakingParameters`, stakingParameters.parameters)
<<<<<<< let atomsDiff = stakingTransactions.delegations && stakingTransactions.delegations // compare old and new delegations and diff against old atoms .map( delegation => calculateTokens( delegation.validator, state.committedDelegates[delegation.validator.owner] ) - delegation.atoms ) .reduce((sum, diff) => sum + diff, 0) commit("setAtoms", user.atoms + atomsDiff) ======= let atomsDiff = delegations // compare old and new delegations and diff against old atoms .map( delegation => calculateTokens( delegation.delegate, state.committedDelegates[delegation.delegate.owner] ) - delegation.atoms ) .reduce((sum, diff) => sum + diff, 0) commit(`setAtoms`, user.atoms + atomsDiff) >>>>>>> let atomsDiff = stakingTransactions.delegations && stakingTransactions.delegations // compare old and new delegations and diff against old atoms .map( delegation => calculateTokens( delegation.validator, state.committedDelegates[delegation.validator.owner] ) - delegation.atoms ) .reduce((sum, diff) => sum + diff, 0) commit(`setAtoms`, user.atoms + atomsDiff)
<<<<<<< import lcdClientMock from "renderer/connectors/lcdClientMock.js" let { stakingParameters } = lcdClientMock.state ======= >>>>>>> import lcdClientMock from "renderer/connectors/lcdClientMock.js" let { stakingParameters } = lcdClientMock.state <<<<<<< wrapper.update() ======= store.commit(`setSearchQuery`, [`balances`, ``]) // we need to wait for the denoms to have loaded // if not they load async and produce errors when the tests already passed await store.dispatch(`loadDenoms`) >>>>>>> store.commit(`setSearchQuery`, [`balances`, ``]) store.commit(`setStakingParameters`, stakingParameters.parameters) // we need to wait for the denoms to have loaded // if not they load async and produce errors when the tests already passed await store.dispatch(`loadDenoms`) <<<<<<< // after importing the @tendermint/ui components from modules // the perfect scroll plugin needs a $nextTick and a wrapper.update // to work properly in the tests (snapshots weren't matching) // this has occured across multiple tests await wrapper.vm.$nextTick() store.commit(`setStakingParameters`, stakingParameters.parameters) wrapper.update() ======= >>>>>>> <<<<<<< store.commit(`setStakingParameters`, stakingParameters.parameters) // after importing the @tendermint/ui components from modules // the perfect scroll plugin needs a $nextTick and a wrapper.update // to work properly in the tests (snapshots weren't matching) // this has occured across multiple tests await wrapper.vm.$nextTick() wrapper.update() ======= >>>>>>> store.commit(`setStakingParameters`, stakingParameters.parameters)
<<<<<<< import Wrapper from 'common/Wrapper'; ======= import ItemLink from 'common/ItemLink'; >>>>>>> <<<<<<< ======= name: 'Maximize ability synergy', description: 'Resto Shaman have cooldowns which feed into each other for compounding effects. To maximize your effectiveness it\'s good to use these feeding effects as much as possible.', requirements: () => { return [ new Requirement({ name: <React.Fragment> <SpellLink id={SPELLS.GIFT_OF_THE_QUEEN.id} /> fed to <SpellLink id={SPELLS.CLOUDBURST_TOTEM_TALENT.id} /> </React.Fragment>, check: () => this.giftOfTheQueen.CBTTotemFeedingSuggestionThreshold, when: this.combatants.selected.hasTalent(SPELLS.CLOUDBURST_TOTEM_TALENT.id), }), ]; }, }), new Rule({ >>>>>>> <<<<<<< name: <Wrapper> ======= name: <React.Fragment> <SpellLink id={SPELLS.GIFT_OF_THE_QUEEN.id} /> target efficiency </React.Fragment>, check: () => this.giftOfTheQueen.giftOfQueenTargetEfficiencySuggestionThreshold, }), new Requirement({ name: <React.Fragment> >>>>>>> name: <React.Fragment>
<<<<<<< if ( this.enemyAttack.on && $Z.iter - this.enemyAttack.tSkip >= ( this.enemyAttack.minSkip + this.enemyAttack.skipVar[ document.skipIndex % this.enemyAttack.skipVar.length ] ) ) { this.enemyAttack.tSkip = $Z.iter ; document.skipIndex++ ; this.enemy.update() ; // switch to "viz.enemy.update()" #todo } ======= >>>>>>> // if ( this.enemyAttack.on && $Z.iter - this.enemyAttack.tSkip >= ( this.enemyAttack.minSkip + this.enemyAttack.skipVar[ document.skipIndex % this.enemyAttack.skipVar.length ] ) ) { // this.enemyAttack.tSkip = $Z.iter ; // document.skipIndex++ ; // this.enemy.update() ; // switch to "viz.enemy.update()" #todo // }
<<<<<<< var i = imageHelper.image2canvas('./images/trump_spritesheet.png') ; var rowName = ['attack', 'hit', 'rest', 'walk'] ; var width = [170, 170, 170, 170] ; var height = [154, 154, 154, 154] ; var spriteset = spriteHelper.get(i, rowName, width, height) ; ======= >>>>>>>
<<<<<<< var viewTrans = $Z.transition.rounded_linear_transition_func('viewportY', yTransition.duration)(0) ; this.viz.add_transition(viewTrans, replacementSwitch) ; ======= var replacementSwitch = true ; this.viz.player.item.add_transition(transition, replacementSwitch) ; >>>>>>> var viewTrans = $Z.transition.rounded_linear_transition_func('viewportY', yTransition.duration)(0) ; this.viz.add_transition(viewTrans, replacementSwitch) ; var replacementSwitch = true ; this.viz.player.item.add_transition(transition, replacementSwitch) ;
<<<<<<< // Crucible of Storms import LeggingsOfTheAberrantTidesage from '../shared/modules/items/bfa/raids/crucibleofstorms/LeggingsOfTheAberrantTidesage'; ======= // Crucible of Storms import TridentOfDeepOcean from '../shared/modules/items/bfa/raids/crucibleofstorms/TridentOfDeepOcean'; >>>>>>> // Crucible of Storms import LeggingsOfTheAberrantTidesage from '../shared/modules/items/bfa/raids/crucibleofstorms/LeggingsOfTheAberrantTidesage'; import TridentOfDeepOcean from '../shared/modules/items/bfa/raids/crucibleofstorms/TridentOfDeepOcean'; <<<<<<< // Crucible of Storms leggingsOfTheAberrantTidesage: LeggingsOfTheAberrantTidesage, ======= // Crucible of Storms tridentOfDeepOcean: TridentOfDeepOcean, >>>>>>> // Crucible of Storms leggingsOfTheAberrantTidesage: LeggingsOfTheAberrantTidesage, tridentOfDeepOcean: TridentOfDeepOcean,
<<<<<<< const result = BlockChain.deposit(account, coins, ""); if (result !== 0) { throw "cannot bet" } ======= BlockChain.deposit(account, coins); >>>>>>> BlockChain.deposit(account, coins, ""); <<<<<<< const reward = (tc.multi(record.coins/ 100000000).div(totalVal/ 100000000)); BlockChain.withdraw(record.account, reward, ""); ======= const reward = (tc.multi(record.coins).div(totalVal)); BlockChain.withdraw(record.account, reward); >>>>>>> const reward = (tc.multi(record.coins).div(totalVal)); BlockChain.withdraw(record.account, reward, "");
<<<<<<< ======= InitAdmin(adminID) { const bn = block.number; if(bn !== 0) { throw new Error("init out of genesis block") } storage.put("adminID", adminID); } can_update(data) { const admin = storage.get("adminID"); return blockchain.requireAuth(admin, "active"); } >>>>>>> InitAdmin(adminID) { const bn = block.number; if(bn !== 0) { throw new Error("init out of genesis block") } storage.put("adminID", adminID); } can_update(data) { const admin = storage.get("adminID"); return blockchain.requireAuth(admin, "active"); }
<<<<<<< let ret = BlockChain.callWithAuth("iost.token", "issue", JSON.stringify(data)); ======= let ret = BlockChain.callWithAuth("token.iost", "issue", JSON.stringify(data)); if (ret != "[]") { throw "issue err " + ret } >>>>>>> let ret = BlockChain.callWithAuth("token.iost", "issue", JSON.stringify(data)); <<<<<<< let ret = BlockChain.callWithAuth("iost.token", "transfer", JSON.stringify(["iost", payer, this._getContractName(), price.toString(), ""])); ======= let ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(["iost", payer, this._getContractName(), price.toString(), ""])); if (ret !== "[]") { throw "deposit err " + ret } >>>>>>> let ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(["iost", payer, this._getContractName(), price.toString(), ""])); <<<<<<< ret = BlockChain.callWithAuth("iost.token", "transfer", JSON.stringify(data)); ======= ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(data)); if (ret !== "[]") { throw "transfer err " + ret } >>>>>>> ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(data)); <<<<<<< let ret = BlockChain.callWithAuth("iost.token", "transfer", JSON.stringify(data)); ======= let ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(data)); if (ret != "[]") { throw "transfer err " + ret } >>>>>>> let ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(data)); <<<<<<< ret = BlockChain.callWithAuth("iost.token", "transfer", JSON.stringify(["iost", this._getContractName(), receiver, price.toString(), ""])); ======= ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(["iost", this._getContractName(), receiver, price.toString(), ""])); if (ret != "[]") { throw "withdraw err " + ret } >>>>>>> ret = BlockChain.callWithAuth("token.iost", "transfer", JSON.stringify(["iost", this._getContractName(), receiver, price.toString(), ""]));
<<<<<<< addInjection(pos, InjectType.gasIncrWithSemicolon, chargedExpression[node.type]); ======= let ip0 = addInjection(pos, InjectType.gasIncrWithSemicolon, 1); >>>>>>> let ip0 = addInjection(pos, InjectType.gasIncrWithSemicolon, chargedExpression[node.type]); <<<<<<< addInjection(pos, InjectType.gasIncrWithSemicolon, chargedExpression[node.type]); ======= let ip0 = addInjection(pos, InjectType.gasIncrWithSemicolon, 1); >>>>>>> let ip0 = addInjection(pos, InjectType.gasIncrWithSemicolon, chargedExpression[node.type]); <<<<<<< let injectionPoint = addInjectionPoint(node.test, InjectType.gasIncrWithComma, chargedExpression[node.type]); ======= let body = node.body; let pos = body.range[0]; if (body.type === 'BlockStatement') { pos = body.range[0] + 1; } let ip0 = addInjection(pos, InjectType.gasIncrWithSemicolon, 1); let injectionPoint = addInjectionPoint(node.test, InjectType.gasIncrWithComma, 1); >>>>>>> let body = node.body; let pos = body.range[0]; if (body.type === 'BlockStatement') { pos = body.range[0] + 1; } let ip0 = addInjection(pos, InjectType.gasIncrWithSemicolon, 1); let injectionPoint = addInjectionPoint(node.test, InjectType.gasIncrWithComma, chargedExpression[node.type]);
<<<<<<< options.callback(err, file); ======= >>>>>>> <<<<<<< options.callback(new Error("Ajax error for " + path + " : " + this.status + " " + this.statusText)); ======= reject(new Error("Ajax error for " + path + " : " + this.status + " " + this.statusText)); >>>>>>> reject(new Error("Ajax error for " + path + " : " + this.status + " " + this.statusText));
<<<<<<< const Config = require('../config'); const Path = require('path'); ======= >>>>>>> <<<<<<< Config.server.instance = server; HauteCouture()(server, options) .then(() => { ======= server.register([ { register: require('bedwetter') } ], (err) => { if (err) { return next(err); } >>>>>>> HauteCouture()(server, options, (err) => { if (err) { return next(err); }
<<<<<<< function compile(lang,txt,{ romanizeIdentifiers="none", logCallback=(x)=>((typeof x)=="string")?console.log(x):console.dir(x,{depth:null,'maxArrayLength':null}), errorCallback=process.exit}={}){ txt = txt.replace(/\r\n/g,"\n"); var tokens = wy2tokens(txt); logCallback("\n\n=== [PASS 1] TOKENIZER ==="); logCallback(tokens) if (romanizeIdentifiers != "none"){ tokenRomanize(tokens,romanizeIdentifiers); } var txtlines = txt.split("\n") function assert(msg,pos,b){ var errmsg = ""; if (!b){ errmsg +=`[Syntax Error] ${msg}\n`; var l = 0; for (var i = 0; i < txtlines.length; i++){ l += txtlines[i].length+1; if (l > pos){ errmsg+=`Line ${1+i}, Character ${1+pos-(l-txtlines[i].length)}:${txtlines[i]}` break; } } logCallback(errmsg) } if (errmsg.length){ if (errorCallback){ errorCallback(errmsg); } return errmsg } return 0; } var asc = tokens2asc(tokens,assert); logCallback("\n\n=== [PASS 2] ABSTRACT SYNTAX CHAIN ==="); logCallback(asc) logCallback("\n\n=== [PASS 3] COMPILER ==="); var targ; switch(lang) { case "js": targ = asc2js(asc); break; case "py": try{asc2py = require('./asc2py.js')}catch(e){}; targ = asc2py(asc); break; case "rb": try{asc2rb = require('./asc2rb.js')}catch(e){}; targ = asc2rb(asc); break; default: logCallback("Target language not supported."); } logCallback(targ); return targ; ======= function compile( lang, txt, { romanizeIdentifiers = "none", resetVarCnt, logCallback = x => typeof x == "string" ? console.log(x) : console.dir(x, { depth: null, maxArrayLength: null }), errorCallback = process.exit } = {} ) { if (resetVarCnt) { tmpVarCnt = 0; randVarCnt = 0; } txt = txt.replace(/\r\n/g, "\n"); var tokens = wy2tokens(txt); logCallback("\n\n=== [PASS 1] TOKENIZER ==="); logCallback(tokens); if (romanizeIdentifiers != "none") { tokenRomanize(tokens, romanizeIdentifiers); } var txtlines = txt.split("\n"); function assert(msg, pos, b) { var errmsg = ""; if (!b) { errmsg += `[Syntax Error] ${msg}\n`; var l = 0; for (var i = 0; i < txtlines.length; i++) { l += txtlines[i].length + 1; if (l > pos) { errmsg += `Line ${1 + i}, Character ${1 + pos - (l - txtlines[i].length)}:${txtlines[i]}`; break; } } logCallback(errmsg); } if (errmsg.length) { if (errorCallback) { errorCallback(errmsg); } return errmsg; } return 0; } var asc = tokens2asc(tokens, assert); logCallback("\n\n=== [PASS 2] ABSTRACT SYNTAX CHAIN ==="); logCallback(asc); logCallback("\n\n=== [PASS 3] COMPILER ==="); var targ; if (lang == "js") { targ = asc2js(asc); } else if (lang == "py") { try { asc2py = require("./asc2py.js"); } catch (e) {} targ = asc2py(asc); } else { logCallback("Target language not supported."); } logCallback(targ); return targ; >>>>>>> function compile( lang, txt, { romanizeIdentifiers = "none", resetVarCnt, logCallback = x => typeof x == "string" ? console.log(x) : console.dir(x, { depth: null, maxArrayLength: null }), errorCallback = process.exit } = {} ) { if (resetVarCnt) { tmpVarCnt = 0; randVarCnt = 0; } txt = txt.replace(/\r\n/g, "\n"); var tokens = wy2tokens(txt); logCallback("\n\n=== [PASS 1] TOKENIZER ==="); logCallback(tokens); if (romanizeIdentifiers != "none") { tokenRomanize(tokens, romanizeIdentifiers); } var txtlines = txt.split("\n"); function assert(msg, pos, b) { var errmsg = ""; if (!b) { errmsg += `[Syntax Error] ${msg}\n`; var l = 0; for (var i = 0; i < txtlines.length; i++) { l += txtlines[i].length + 1; if (l > pos) { errmsg += `Line ${1 + i}, Character ${1 + pos - (l - txtlines[i].length)}:${txtlines[i]}`; break; } } logCallback(errmsg); } if (errmsg.length) { if (errorCallback) { errorCallback(errmsg); } return errmsg; } return 0; } var asc = tokens2asc(tokens, assert); logCallback("\n\n=== [PASS 2] ABSTRACT SYNTAX CHAIN ==="); logCallback(asc); logCallback("\n\n=== [PASS 3] COMPILER ==="); var targ; switch(lang) { case "js": targ = asc2js(asc); break; case "py": try{asc2py = require('./asc2py.js')}catch(e){}; targ = asc2py(asc); break; case "rb": try{asc2rb = require('./asc2rb.js')}catch(e){}; targ = asc2rb(asc); break; default: logCallback("Target language not supported."); } logCallback(targ); return targ;
<<<<<<< function hideImportedModules(source) { const markerRegex = /\/\*___wenyan_module_([\s\S]+?)_(start|end)___\*\//g; const matches = []; var match; while ((match = markerRegex.exec(source))) { if (!match) break; if (matches.length) { const prev = matches[matches.length - 1]; if (prev[2] !== "end" && prev[1] !== match[1]) continue; // ignore nested imports } matches.push(match); } for (const match of matches) { if (match[2] === "start") continue; source = source.replace( new RegExp( `\\/\\*___wenyan_module_${match[1]}_start___\\*\\/[\\s\\S]*\\/\\*___wenyan_module_${match[1]}_end___\\*\\/` ), `/* module ${match[1]} is hidden */\n` ); } return source; } var ed = newEditor(prgms["mandelbrot"]); // var ln = newLineNo(ed); ======= >>>>>>> function hideImportedModules(source) { const markerRegex = /\/\*___wenyan_module_([\s\S]+?)_(start|end)___\*\//g; const matches = []; var match; while ((match = markerRegex.exec(source))) { if (!match) break; if (matches.length) { const prev = matches[matches.length - 1]; if (prev[2] !== "end" && prev[1] !== match[1]) continue; // ignore nested imports } matches.push(match); } for (const match of matches) { if (match[2] === "start") continue; source = source.replace( new RegExp( `\\/\\*___wenyan_module_${match[1]}_start___\\*\\/[\\s\\S]*\\/\\*___wenyan_module_${match[1]}_end___\\*\\/` ), `/* module ${match[1]} is hidden */\n` ); } return source; }
<<<<<<< import { addHref, createProps, getBehaviorElements, getFirstTag, getUrlFromHref, later } from 'hyperview/src/services'; ======= import { createProps, getBehaviorElements, getFirstTag, later } from 'hyperview/src/services'; >>>>>>> import { addHref, createProps, getBehaviorElements, getFirstTag, getUrlFromHref, later } from 'hyperview/src/services'; <<<<<<< const preloadScreen = this.props.navigation.state.params.preloadScreen ? this.navigation.getPreloadScreen(this.props.navigation.state.params.preloadScreen) ======= const preloadScreen = params.preloadScreen ? PRELOAD_SCREEN[params.preloadScreen] >>>>>>> const preloadScreen = params.preloadScreen ? this.navigation.getPreloadScreen(params.preloadScreen) <<<<<<< const { preloadScreen } = this.props.navigation.state.params; if (preloadScreen && this.navigation.getPreloadScreen(preloadScreen)) { this.navigation.remove(preloadScreen); ======= const { params } = this.getNavigationState(this.props); const { preloadScreen } = params; if (preloadScreen && PRELOAD_SCREEN[preloadScreen]) { delete PRELOAD_SCREEN[preloadScreen]; >>>>>>> const { params } = this.getNavigationState(this.props); const { preloadScreen } = params; if (preloadScreen && this.navigation.getPreloadScreen(preloadScreen)) { this.navigation.remove(preloadScreen); <<<<<<< this.navigation.setRouteKey(url, this.props.navigation.state.key); ======= ROUTE_KEYS[getHrefKey(url)] = routeKey; >>>>>>> this.navigation.setRouteKey(url, routeKey);
<<<<<<< 'Kamelraucher', 'Kranbauer', ======= 'Kamelraucher', 'Klosteinmauer', 'Karatehauer', 'Klausverhauer', 'Krimkalauer', 'Krillverdauer', 'Katerflauer', 'Katzenmiauer', 'Knotentauer', 'Koreamauer', 'Kamillenbrauer', 'Kastratenkrauler', 'Kardinalvertrauer', 'Kroatenlauer', 'Kapillarenkalker', 'Kloakenrauer', 'Kreisbegatter', 'Kolibriklabauter', 'Klimperpower', 'Kliniktrauer', 'Konradadenauer', >>>>>>> 'Kamelraucher', 'Kranbauer', 'Klosteinmauer', 'Karatehauer', 'Klausverhauer', 'Krimkalauer', 'Krillverdauer', 'Katerflauer', 'Katzenmiauer', 'Knotentauer', 'Koreamauer', 'Kamillenbrauer', 'Kastratenkrauler', 'Kardinalvertrauer', 'Kroatenlauer', 'Kapillarenkalker', 'Kloakenrauer', 'Kreisbegatter', 'Kolibriklabauter', 'Klimperpower', 'Kliniktrauer', 'Konradadenauer',
<<<<<<< require('./services/reddit'), ======= require('./services/stumbleupon'), >>>>>>> require('./services/reddit'), require('./services/stumbleupon'),
<<<<<<< import DefaultPages from './pages.component'; import Page from './page/page.component'; ======= >>>>>>> <<<<<<< <OriginalButton onClick={ ev => handleSlide(ev, 1) }> Go to second page </OriginalButton> ======= <OriginalButton onClick={ (ev) => { handleSlide(ev, 1); } }> Go to second page </OriginalButton> >>>>>>> <OriginalButton onClick={ (ev) => handleSlide(ev, 1) }> Go to second page </OriginalButton>
<<<<<<< import TestUtils from 'react-dom/test-utils'; ======= import TestUtils from 'react/lib/ReactTestUtils'; import { shallow } from 'enzyme'; import { elementsTagTest, rootTagTest } from '../../utils/helpers/tags/tags-specs'; >>>>>>> import TestUtils from 'react-dom/test-utils'; import { shallow } from 'enzyme'; import { elementsTagTest, rootTagTest } from '../../utils/helpers/tags/tags-specs';
<<<<<<< describe('handleBlur', () => { beforeEach(() => { spyOn(instance, 'setState'); input = TestUtils.scryRenderedDOMComponentsWithTag(instance, 'input'); }); describe('when the input value is valid', ()=> { it('calls setState with the current value', ()=> { TestUtils.Simulate.blur(input[0]); expect(instance.setState).toHaveBeenCalledWith({ inputValue: 'bar' }); }); }); describe('when the input value is not valid', ()=> { it('calls setState with the last selected value', ()=> { instance.setState({inputValue: 'xFxOx'}); TestUtils.Simulate.blur(input[0]); expect(instance.setState).toHaveBeenCalledWith({ inputValue: 'bar' }); }); }); }); describe('handleSelect', () => { beforeEach(() => { spyOn(instance, 'setState'); }); it('calls emitOnChangeCallback with the selected value and resets the filter', () => { spyOn(instance, 'emitOnChangeCallback'); let ev = { target: { getAttribute: function() {} }}; spyOn(ev.target, 'getAttribute').and.returnValue('foo'); instance._handleSelect(ev); expect(instance.emitOnChangeCallback).toHaveBeenCalledWith('foo'); expect(instance.setState).toHaveBeenCalledWith({ filter: '' }); }); }); describe('handleVisibleChange', () => { it('calls setState and applies the input text to the inputValue and the filter', ()=> { }); }); ======= describe('handleMouseEnterList', () => { it('sets blockBlur to true', () => { instance.blockBlur = false; TestUtils.Simulate.mouseEnter(instance.refs.list); expect(instance.blockBlur).toBeTruthy(); }); }); describe('handleMouseLeaveList', () => { it('sets blockBlur to true', () => { instance.blockBlur = true; TestUtils.Simulate.mouseLeave(instance.refs.list); expect(instance.blockBlur).toBeFalsy(); }); }); describe('handleMouseDownOnList', () => { beforeEach(() => { jasmine.clock().install(); spyOn(instance.refs.input, 'focus'); }); afterEach(() => { jasmine.clock().uninstall(); }); describe('when the target was not the list', () => { it('does not call focus on the input', () => { TestUtils.Simulate.mouseDown(instance.refs.list, { target: 'foo' }); jasmine.clock().tick(0); expect(instance.refs.input.focus).not.toHaveBeenCalled(); }); }); describe('when the target was the list', () => { it('does not call focus on the input', () => { TestUtils.Simulate.mouseDown(instance.refs.list, { target: instance.refs.list }); jasmine.clock().tick(0); expect(instance.refs.input.focus).toHaveBeenCalled(); }); }); }); >>>>>>> describe('handleBlur', () => { beforeEach(() => { spyOn(instance, 'setState'); input = TestUtils.scryRenderedDOMComponentsWithTag(instance, 'input'); }); describe('when the input value is valid', ()=> { it('calls setState with the current value', ()=> { TestUtils.Simulate.blur(input[0]); expect(instance.setState).toHaveBeenCalledWith({ inputValue: 'bar' }); }); }); describe('when the input value is not valid', ()=> { it('calls setState with the last selected value', ()=> { instance.setState({inputValue: 'xFxOx'}); TestUtils.Simulate.blur(input[0]); expect(instance.setState).toHaveBeenCalledWith({ inputValue: 'bar' }); }); }); }); describe('handleSelect', () => { beforeEach(() => { spyOn(instance, 'setState'); }); it('calls emitOnChangeCallback with the selected value and resets the filter', () => { spyOn(instance, 'emitOnChangeCallback'); let ev = { target: { getAttribute: function() {} }}; spyOn(ev.target, 'getAttribute').and.returnValue('foo'); instance._handleSelect(ev); expect(instance.emitOnChangeCallback).toHaveBeenCalledWith('foo'); expect(instance.setState).toHaveBeenCalledWith({ filter: '' }); }); }); describe('handleVisibleChange', () => { it('calls setState and applies the input text to the inputValue and the filter', ()=> { }); }); describe('handleMouseEnterList', () => { it('sets blockBlur to true', () => { instance.blockBlur = false; TestUtils.Simulate.mouseEnter(instance.refs.list); expect(instance.blockBlur).toBeTruthy(); }); }); describe('handleMouseLeaveList', () => { it('sets blockBlur to true', () => { instance.blockBlur = true; TestUtils.Simulate.mouseLeave(instance.refs.list); expect(instance.blockBlur).toBeFalsy(); }); }); describe('handleMouseDownOnList', () => { beforeEach(() => { jasmine.clock().install(); spyOn(instance.refs.input, 'focus'); }); afterEach(() => { jasmine.clock().uninstall(); }); describe('when the target was not the list', () => { it('does not call focus on the input', () => { TestUtils.Simulate.mouseDown(instance.refs.list, { target: 'foo' }); jasmine.clock().tick(0); expect(instance.refs.input.focus).not.toHaveBeenCalled(); }); }); describe('when the target was the list', () => { it('does not call focus on the input', () => { TestUtils.Simulate.mouseDown(instance.refs.list, { target: instance.refs.list }); jasmine.clock().tick(0); expect(instance.refs.input.focus).toHaveBeenCalled(); }); }); });
<<<<<<< 09-07-2017 - Resto Druid: Added relic traits module (By Blazyb) 09-07-2017 - Resto Druid: Activated low health healing module (By Blazyb) 09-07-2017 - Resto Druid: Added suggestions to cultivation and spring blossoms (By Blazyb) 09-04-2017 - Resto Druid: Added Mastery calculations, with support for Spring Blossoms, Cenarion Ward, Cultivation, and the T19 2Set ======= 09-09-2017 - Resto Druid: Added suggestion when high Nature's Essence overheal. (By Sref) 07-09-2017 - Resto Druid: Added support for T21. (By Sref) 07-09-2017 - Resto Druid: Activated low health healing module (By Blazyb) 07-09-2017 - Resto Druid: Added suggestions to cultivation and spring blossoms (By Blazyb) 04-09-2017 - Resto Druid: Added Mastery calculations, with support for Spring Blossoms, Cenarion Ward, Cultivation, and the T19 2Set (By Sref) >>>>>>> 09-07-2017 - Resto Druid: Added relic traits module (By Blazyb) 09-09-2017 - Resto Druid: Added suggestion when high Nature's Essence overheal. (By Sref) 07-09-2017 - Resto Druid: Added support for T21. (By Sref) 07-09-2017 - Resto Druid: Activated low health healing module (By Blazyb) 07-09-2017 - Resto Druid: Added suggestions to cultivation and spring blossoms (By Blazyb) 04-09-2017 - Resto Druid: Added Mastery calculations, with support for Spring Blossoms, Cenarion Ward, Cultivation, and the T19 2Set (By Sref)
<<<<<<< let value = props.value || 0.00; this.setState({ visibleValue: I18nHelper.formatDecimal(value, this.props.precision) }); ======= let value = props.value || props.defaultValue; if (canConvertToBigNumber(value)) { value = I18nHelper.formatDecimal(value, this.props.precision); } this.setState({ visibleValue: value }); >>>>>>> let value = props.value || 0.00; if (canConvertToBigNumber(value)) { value = I18nHelper.formatDecimal(value, this.props.precision); } this.setState({ visibleValue: value });
<<<<<<< <div className="view-finances"> <FinancesHistory /> <Button onClick={ this.handleOnClick }>Edit My Details</Button> <QuickCreate /> <h1 className="view-finances__title">{ name }</h1> <Form model="foo" saving={ this.state.financesStore.get('isSaving') } afterFormValidation={ this.save } ref="form"> <FinancesDetails name={ name } countryValue={ this.state.financesStore.getIn(['country', 'id']) } countryVisibleValue={ this.state.financesStore.getIn(['country', 'name']) } accounts={ this.state.financesStore.get('accounts') } foo={ this.state.financesStore.get('foo') } options={ this.state.financesStore.get('options') } discount={ this.state.financesStore.get('discount') } dateFrom={ this.state.financesStore.get('date_from') } /> <FinancesChart data={ this.state.financesStore.get('chart_data') } balance={ this.state.financesStore.get('balance') } /> <FinancesTable data={ this.state.financesStore.get('line_items') } discount={ this.state.financesStore.get('discount') } balance={ this.state.financesStore.get('balance') } discountTotal={ this.state.financesStore.get('discount_total') } debitTotal={ this.state.financesStore.get('debit_total') } creditTotal={ this.state.financesStore.get('credit_total') } /> </Form> <Link className="home-link" href='#' disabled>Main Page</Link> <UserDialog /> <Flash cancelHandler={ this.handleFlashEnd } title="Save Successful!" open={this.state.financesStore.get('displayFlash')} mode='warning' /> ======= <div> <Notification as="new" title="This is a title" message="This is my message." /> <div className="view-finances"> <FinancesHistory /> <Button onClick={ this.handleOnClick }>Edit My Details</Button> <QuickCreate /> <h1 className="view-finances__title">{ name }</h1> <Form model="foo"> <FinancesDetails name={ name } countryValue={ financesStore.getIn(['country', 'id']) } countryVisibleValue={ financesStore.getIn(['country', 'name']) } accounts={ financesStore.get('accounts') } foo={ financesStore.get('foo') } options={ financesStore.get('options') } discount={ financesStore.get('discount') } dateFrom={ financesStore.get('date_from') } /> <FinancesChart data={ financesStore.get('chart_data') } balance={ financesStore.get('balance') } /> <FinancesTable data={ financesStore.get('line_items') } discount={ financesStore.get('discount') } balance={ financesStore.get('balance') } discountTotal={ financesStore.get('discount_total') } debitTotal={ financesStore.get('debit_total') } creditTotal={ financesStore.get('credit_total') } /> </Form> <Link className="home-link" href='#' disabled>Main Page</Link> <UserDialog /> </div> >>>>>>> <div> <Notification as="new" title="This is a title" message="This is my message." /> <div className="view-finances"> <FinancesHistory /> <Button onClick={ this.handleOnClick }>Edit My Details</Button> <QuickCreate /> <h1 className="view-finances__title">{ name }</h1> <Form model="foo"> <FinancesDetails name={ name } countryValue={ financesStore.getIn(['country', 'id']) } countryVisibleValue={ financesStore.getIn(['country', 'name']) } accounts={ financesStore.get('accounts') } foo={ financesStore.get('foo') } options={ financesStore.get('options') } discount={ financesStore.get('discount') } dateFrom={ financesStore.get('date_from') } /> <FinancesChart data={ financesStore.get('chart_data') } balance={ financesStore.get('balance') } /> <FinancesTable data={ financesStore.get('line_items') } discount={ financesStore.get('discount') } balance={ financesStore.get('balance') } discountTotal={ financesStore.get('discount_total') } debitTotal={ financesStore.get('debit_total') } creditTotal={ financesStore.get('credit_total') } /> </Form> <Link className="home-link" href='#' disabled>Main Page</Link> <UserDialog /> <Flash cancelHandler={ this.handleFlashEnd } title="Save Successful!" open={this.state.financesStore.get('displayFlash')} mode='warning' /> </div>
<<<<<<< restlessBlades: RestlessBlades, rolltheBonesBuffs: RollTheBonesBuffs, ======= restlessBlades: RestlessBlades, rollTheBonesCastTracker: RollTheBonesCastTracker, >>>>>>> restlessBlades: RestlessBlades, rollTheBonesCastTracker: RollTheBonesCastTracker, <<<<<<< opportunity: Opportunity, betweenTheEyes: BetweenTheEyes, ======= rollTheBonesBuffs: RollTheBonesBuffs, rollTheBonesCounter: RollTheBonesCounter, rollTheBonesEfficiency: RollTheBonesEfficiency, >>>>>>> opportunity: Opportunity, betweenTheEyes: BetweenTheEyes, rollTheBonesBuffs: RollTheBonesBuffs, rollTheBonesCounter: RollTheBonesCounter, rollTheBonesEfficiency: RollTheBonesEfficiency,
<<<<<<< import { validProps } from '../../../utils/ether'; ======= import { WithDragAndDrop } from './../../with-drag-and-drop'; >>>>>>> import { validProps } from '../../../utils/ether'; import { WithDragAndDrop } from './../../with-drag-and-drop';
<<<<<<< ToastStyle, ToastContentStyle, ToastWrapper } from './toast.style'; import { assertStyleMatch } from '../../__spec_helper__/test-utils'; import IconButton from '../icon-button'; import ModalManager from '../modal/__internal__/modal-manager'; ======= elementsTagTest, rootTagTest, } from "../../utils/helpers/tags/tags-specs/tags-specs"; import Toast from "./toast.component"; import { ToastStyle, ToastContentStyle, ToastWrapper } from "./toast.style"; import { assertStyleMatch } from "../../__spec_helper__/test-utils"; import IconButton from "../icon-button"; >>>>>>> elementsTagTest, rootTagTest, } from "../../utils/helpers/tags/tags-specs/tags-specs"; <<<<<<< describe('modal manager', () => { jest.spyOn(ModalManager, 'addModal'); jest.spyOn(ModalManager, 'removeModal'); describe('when component mounts', () => { it('it is added to modal manager', () => { const wrapper = mount( <Toast isCenter onDismiss={ () => {} }>foobar</Toast> ); const toast = wrapper.instance().toastRef.current; expect(ModalManager.addModal).toHaveBeenCalledWith(toast); }); }); describe('when component unmounts', () => { it('it is removed from modal manager', () => { const wrapper = mount( <Toast onDismiss={ () => {} }>foobar</Toast> ); const toast = wrapper.instance().toastRef.current; wrapper.unmount(); expect(ModalManager.removeModal).toHaveBeenCalledWith(toast); }); }); }); describe('when toast is closed', () => { it('should exists anyway', () => { ======= describe("when toast is closed", () => { it("should exists anyway", () => { >>>>>>> describe("modal manager", () => { jest.spyOn(ModalManager, "addModal"); jest.spyOn(ModalManager, "removeModal"); describe("when component mounts", () => { it("it is added to modal manager", () => { const wrapper = mount( <Toast isCenter onDismiss={() => {}}> foobar </Toast> ); const toast = wrapper.instance().toastRef.current; expect(ModalManager.addModal).toHaveBeenCalledWith(toast); }); }); describe("when component unmounts", () => { it("it is removed from modal manager", () => { const wrapper = mount(<Toast onDismiss={() => {}}>foobar</Toast>); const toast = wrapper.instance().toastRef.current; wrapper.unmount(); expect(ModalManager.removeModal).toHaveBeenCalledWith(toast); }); }); }); describe("when toast is closed", () => { it("should exists anyway", () => { <<<<<<< onDismissFn = jest.fn(); wrapper = mount( <Toast open onDismiss={ onDismissFn } /> ); ======= wrapper = mount(<Toast open onDismiss={onDismissFn} />); >>>>>>> onDismissFn = jest.fn(); wrapper = mount(<Toast open onDismiss={onDismissFn} />);
<<<<<<< import ClassNames from 'classnames'; import I18n from 'i18n-js'; ======= import classNames from 'classnames'; >>>>>>> import I18n from 'i18n-js'; import classNames from 'classnames'; <<<<<<< get classes() { return ClassNames( 'ui-flash', ======= render() { let flashHTML, sliderHTML, mainClasses; mainClasses = classNames( 'carbon-flash', >>>>>>> get classes() { let flashHTML, sliderHTML, mainClasses; mainClasses = classNames( 'carbon-flash',
<<<<<<< ${InputIconToggleStyle} { background-color: #255bc7; border-color: #255bc7; color: #fff; } ${InputIconToggleStyle}:hover { background-color: #1e499f; border-color: #1e499f; } ======= z-index: 2; >>>>>>> z-index: 2; ${InputIconToggleStyle} { background-color: #255bc7; border-color: #255bc7; color: #fff; } ${InputIconToggleStyle}:hover { background-color: #1e499f; border-color: #1e499f; }
<<<<<<< import IconDemo from './icon-demo'; ======= import PillDemo from './pill-demo'; >>>>>>> import IconDemo from './icon-demo'; import PillDemo from './pill-demo'; <<<<<<< <IconDemo /> ======= <PillDemo /> >>>>>>> <IconDemo /> <PillDemo />
<<<<<<< checkbox: { label: "Checkbox", labelHelp: "Example label help.", fieldHelp: "Example field help." }, ======= confirm: { title: 'Are you sure?' }, >>>>>>> checkbox: { label: "Checkbox", labelHelp: "Example label help.", fieldHelp: "Example field help." }, confirm: { title: 'Are you sure?' }, <<<<<<< dropdown: { label: "Dropdown", labelHelp: "Example label help.", fieldHelp: "Example field help." }, ======= dialog_full_screen: { open: false, title: 'Your Header Goes Here', disableBackground: true }, >>>>>>> dropdown: { label: "Dropdown", labelHelp: "Example label help.", fieldHelp: "Example field help." }, dialog_full_screen: { open: false, title: 'Your Header Goes Here', disableBackground: true },
<<<<<<< import RainOfFire from './modules/features/RainOfFire'; ======= import Checklist from './modules/features/Checklist/Module'; >>>>>>> import RainOfFire from './modules/features/RainOfFire'; import Checklist from './modules/features/Checklist/Module'; <<<<<<< rainOfFire: RainOfFire, ======= checklist: Checklist, >>>>>>> rainOfFire: RainOfFire, checklist: Checklist,
<<<<<<< prefix, ======= labelWidth, inputWidth, >>>>>>> labelWidth, inputWidth, prefix, <<<<<<< /** Emphasized part of the displayed text */ prefix: PropTypes.string, ======= /** Margin bottom, given number will be multiplied by base spacing unit (8) */ mb: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 7]), >>>>>>> /** Emphasized part of the displayed text */ prefix: PropTypes.string, /** Margin bottom, given number will be multiplied by base spacing unit (8) */ mb: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 7]),
<<<<<<< import styled, { css } from "styled-components"; import { slideAnimation, fadeAnimation } from "./pages.config"; import { StyledHeadingIcon } from "../heading/heading.style"; import { isClassic } from "../../utils/helpers/style-helper"; import LinkStyleAnchor from "../link/link.style"; import BaseTheme from "../../style/themes/base"; ======= import styled from 'styled-components'; import { slideAnimation, fadeAnimation } from './pages.config'; import { StyledHeading, StyledHeadingIcon } from '../heading/heading.style'; import LinkStyleAnchor from '../link/link.style'; import BaseTheme from '../../style/themes/base'; >>>>>>> import styled from "styled-components"; import { slideAnimation, fadeAnimation } from "./pages.config"; import { StyledHeading, StyledHeadingIcon } from "../heading/heading.style"; import LinkStyleAnchor from "../link/link.style"; import BaseTheme from "../../style/themes/base";
<<<<<<< import FromTheShadows from './FromTheShadows'; import SoulStrike from './SoulStrike'; import SummonVilefiend from './SummonVilefiend'; ======= import PowerSiphon from './PowerSiphon'; import Doom from './Doom'; >>>>>>> import FromTheShadows from './FromTheShadows'; import SoulStrike from './SoulStrike'; import SummonVilefiend from './SummonVilefiend'; import PowerSiphon from './PowerSiphon'; import Doom from './Doom'; <<<<<<< fromTheShadows: FromTheShadows, soulStrike: SoulStrike, summonVilefiend: SummonVilefiend, ======= powerSiphon: PowerSiphon, doom: Doom, >>>>>>> fromTheShadows: FromTheShadows, soulStrike: SoulStrike, summonVilefiend: SummonVilefiend, powerSiphon: PowerSiphon, doom: Doom,
<<<<<<< dragAndDropIdentifier: "String", ======= children: "Node", className: "String", >>>>>>> children: "Node", className: "String", dragAndDropIdentifier: "String", <<<<<<< dragAndDropIdentifier: "Creates a unique association for this drag and drop instance.", ======= children: "This component supports children.", className: "Classes to apply to the component.", >>>>>>> children: "This component supports children.", className: "Classes to apply to the component.", dragAndDropIdentifier: "Creates a unique association for this drag and drop instance.",
<<<<<<< import Tradewinds from '../shared/modules/spells/bfa/azeritetraits/Tradewinds'; ======= import UnstableCatalyst from '../shared/modules/spells/bfa/azeritetraits/UnstableCatalyst'; import SwirlingSands from '../shared/modules/spells/bfa/azeritetraits/SwirlingSands'; >>>>>>> import UnstableCatalyst from '../shared/modules/spells/bfa/azeritetraits/UnstableCatalyst'; import SwirlingSands from '../shared/modules/spells/bfa/azeritetraits/SwirlingSands'; import Tradewinds from '../shared/modules/spells/bfa/azeritetraits/Tradewinds'; <<<<<<< tradewinds: Tradewinds, ======= unstableCatalyst: UnstableCatalyst, swirlingSands: SwirlingSands, >>>>>>> unstableCatalyst: UnstableCatalyst, swirlingSands: SwirlingSands, tradewinds: Tradewinds,
<<<<<<< Then('closeIcon is focused in no iframe', () => { closeIconButton().focus(); }); ======= When('I click outside of the component', () => { storyRoot().click(); }); When('I click outside of the component in DLS directory', () => { dlsRoot().click(); }); When('I click above of the component in no iFrame', () => { storyRootNoIframe().click('top'); }); >>>>>>> Then('closeIcon is focused in no iframe', () => { closeIconButton().focus(); }); When('I click outside of the component', () => { storyRoot().click(); }); When('I click outside of the component in DLS directory', () => { dlsRoot().click(); }); When('I click above of the component in no iFrame', () => { storyRootNoIframe().click('top'); });
<<<<<<< import styled, { css } from "styled-components"; import BaseTheme from "../../../style/themes/base"; import LinkStyleAnchor from "../../link/link.style"; import StyledIcon from "../../icon/icon.style"; import { isClassic } from "../../../utils/helpers/style-helper"; ======= import styled from 'styled-components'; import BaseTheme from '../../../style/themes/base'; import LinkStyleAnchor from '../../link/link.style'; import StyledIcon from '../../icon/icon.style'; >>>>>>> import styled from "styled-components"; import BaseTheme from "../../../style/themes/base"; import LinkStyleAnchor from "../../link/link.style"; import StyledIcon from "../../icon/icon.style"; <<<<<<< ${({ theme }) => !isClassic(theme) && css` margin-top: 0px; top: 5px; `} ======= >>>>>>>
<<<<<<< import './portal.scss'; ======= import ScrollableParent from '../../utils/helpers/scrollable-parent'; >>>>>>> import ScrollableParent from '../../utils/helpers/scrollable-parent'; import './portal.scss';
<<<<<<< carousel: { slideData: [{}, {}] }, ======= button_toggle: { option_one: "Option One" }, >>>>>>> button_toggle: { option_one: "Option One" }, carousel: { slideData: [{}, {}] },
<<<<<<< import { mount, shallow } from 'enzyme'; ======= >>>>>>> <<<<<<< import Dialog from './dialog'; ======= import { shallow, mount } from 'enzyme'; import Browser from '../../utils/helpers/browser'; import Dialog from './dialog'; >>>>>>> import { mount, shallow } from 'enzyme'; import Browser from '../../utils/helpers/browser'; import Dialog from './dialog'; <<<<<<< instance = TestUtils.renderIntoDocument( <Dialog open onCancel={ onCancel } /> ======= wrapper = mount( <Dialog open={ true } onCancel={ onCancel } /> >>>>>>> wrapper = mount( <Dialog open onCancel={ onCancel } /> <<<<<<< const spy = spyOn(window, 'addEventListener'); instance.componentDidUpdate(); expect(spy.calls.count()).toEqual(2); expect(window.addEventListener).toHaveBeenCalledWith('resize', instance.centerDialog); expect(window.addEventListener).toHaveBeenCalledWith('keyup', instance.closeModal); ======= spyOn(mockWindow, 'addEventListener'); wrapper.setProps({ title: 'Dialog title' }); expect(mockWindow.addEventListener.calls.count()).toEqual(2); expect(mockWindow.addEventListener).toHaveBeenCalledWith('resize', instance.centerDialog); expect(mockWindow.addEventListener).toHaveBeenCalledWith('keyup', instance.closeModal); >>>>>>> spyOn(mockWindow, 'addEventListener'); wrapper.setProps({ title: 'Dialog title' }); expect(mockWindow.addEventListener.calls.count()).toEqual(2); expect(mockWindow.addEventListener).toHaveBeenCalledWith('resize', instance.centerDialog); expect(mockWindow.addEventListener).toHaveBeenCalledWith('keyup', instance.closeModal); <<<<<<< const spy = spyOn(window, 'addEventListener'); ======= spyOn(mockWindow, 'addEventListener'); >>>>>>> spyOn(mockWindow, 'addEventListener'); <<<<<<< const spy = spyOn(window, 'removeEventListener'); instance.componentDidUpdate(); expect(spy.calls.count()).toEqual(2); expect(window.removeEventListener).toHaveBeenCalledWith('resize', instance.centerDialog); expect(window.removeEventListener).toHaveBeenCalledWith('keyup', instance.closeModal); ======= spyOn(mockWindow, 'removeEventListener'); wrapper.setProps({ title: 'Dialog closed' }); expect(mockWindow.removeEventListener.calls.count()).toEqual(2); expect(mockWindow.removeEventListener).toHaveBeenCalledWith('resize', instance.centerDialog); expect(mockWindow.removeEventListener).toHaveBeenCalledWith('keyup', instance.closeModal); >>>>>>> spyOn(mockWindow, 'removeEventListener'); wrapper.setProps({ title: 'Dialog closed' }); expect(mockWindow.removeEventListener.calls.count()).toEqual(2); expect(mockWindow.removeEventListener).toHaveBeenCalledWith('resize', instance.centerDialog); expect(mockWindow.removeEventListener).toHaveBeenCalledWith('keyup', instance.closeModal);
<<<<<<< import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import { tagComponent } from '../../utils/helpers/tags'; ======= import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import PropTypes from 'prop-types'; import Icon from './../icon'; import tagComponent from '../../utils/helpers/tags'; >>>>>>> import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import PropTypes from 'prop-types'; import Icon from './../icon'; import tagComponent from '../../utils/helpers/tags'; <<<<<<< <CSSTransitionGroup transitionAppear={ true } ======= <ReactCSSTransitionGroup transitionAppear >>>>>>> <CSSTransitionGroup transitionAppear
<<<<<<< import InputClass from './../../utils/input-class/index.js'; ======= import Input from './../../utils/input'; import InputValidation from './../../utils/input-validation'; >>>>>>> import Input from './../../utils/input-class/index.js'; import InputValidation from './../../utils/input-validation'; <<<<<<< <div className='ui-textbox'> { this.labelHTML() } ======= <div className='ui-textbox'> { this.props.labelHTML() } >>>>>>> <div className='ui-textbox'> { this.props.labelHTML() } <<<<<<< className="base-text-input" { ...this.inputProps() } ======= onBlur={ this.props.handleBlur } onFocus={ this.props.handleFocus } { ...this.props.inputProps() } >>>>>>> className="base-text-input" onBlur={ this.props.handleBlur } onFocus={ this.props.handleFocus } { ...this.props.inputProps() }
<<<<<<< import Button from '../button'; ======= import Form from '../form'; import Textbox from '../textbox'; import Button from '../button/button'; >>>>>>> import Button from '../button'; import Form from '../form'; import Textbox from '../textbox';
<<<<<<< 18-10-2017 - Added Soul of the Huntmaster, MKII Gyroscopic Stabilizer and War Belt of the Sentinel Army support. (by Putro) ======= 20-10-2017 - Added True aim and lock and load support. (by Putro) >>>>>>> 20-10-2017 - Added True aim and lock and load support. (by Putro) 18-10-2017 - Added Soul of the Huntmaster, MKII Gyroscopic Stabilizer and War Belt of the Sentinel Army support. (by Putro)
<<<<<<< lowestMana = null; // start at `null` and fill it with the first value to account for users starting at a non-default amount for whatever reason endingMana = 0; ======= >>>>>>> <<<<<<< on_byPlayer_cast(event) { if (event.classResources) { event.classResources .filter(resource => resource.type === RESOURCE_TYPES.MANA.id) .forEach(({ amount, cost, max }) => { const manaValue = amount; const manaCost = cost || 0; const currentMana = manaValue - manaCost; this.endingMana = currentMana; if (this.lowestMana === null || currentMana < this.lowestMana) { this.lowestMana = currentMana; } this.manaUpdates.push({ timestamp: event.timestamp, current: currentMana, max: max, used: manaCost, }); // The variable 'max' is constant but can differentiate by racial/items. this.maxMana = max; }); } } on_fightend() { ======= on_finished() { >>>>>>> on_fightend() {
<<<<<<< import mintTheme from '../../style/themes/mint' ======= import smallTheme from '../../style/themes/small' import classicTheme from '../../style/themes/classic' >>>>>>> import mintTheme from '../../style/themes/mint' import classicTheme from '../../style/themes/classic' <<<<<<< outline: `solid 3px ${mintTheme.colors.focus}` }, wrapper.find(PagesContent), { modifier: `${LinkStyleAnchor} a:focus` }) ======= outline: `solid 3px ${smallTheme.colors.focus}` }, wrapper.find(PagesContent), { modifier: `&&&& ${LinkStyleAnchor} button:focus` }) }); it('renders a back link and applies the expected style for classic theme with a subheader and no divider', () => { const wrapper = mount( <StyledHeading theme={ classicTheme } subheader='foo' /> ); assertStyleMatch({ marginTop: '-14px' }, wrapper, { modifier: `&&&& ${LinkStyleAnchor}`}) }); it('renders a back link and applies the expected style for classic theme with no divider or subheader', () => { const wrapper = mount( <StyledHeading theme={ classicTheme } /> ); assertStyleMatch({ marginTop: '-10px' }, wrapper, { modifier: `&&&& ${LinkStyleAnchor}`}) >>>>>>> outline: `solid 3px ${mintTheme.colors.focus}` }, wrapper.find(PagesContent), { modifier: `&&&& ${LinkStyleAnchor} button:focus` }) }); it('renders a back link and applies the expected style for classic theme with a subheader and no divider', () => { const wrapper = mount( <StyledHeading theme={ classicTheme } subheader='foo' /> ); assertStyleMatch({ marginTop: '-14px' }, wrapper, { modifier: `&&&& ${LinkStyleAnchor}`}) }); it('renders a back link and applies the expected style for classic theme with no divider or subheader', () => { const wrapper = mount( <StyledHeading theme={ classicTheme } /> ); assertStyleMatch({ marginTop: '-10px' }, wrapper, { modifier: `&&&& ${LinkStyleAnchor}`})
<<<<<<< let value = props.value || 0.00; ======= let value = newProps.value || newProps.defaultValue; >>>>>>> let value = newProps.value || 0.00;
<<<<<<< ======= import TestUtils from 'react-dom/test-utils'; >>>>>>> <<<<<<< import { shallow } from 'enzyme'; ======= import { shallow } from 'enzyme'; import { elementsTagTest, rootTagTest } from '../../utils/helpers/tags/tags-specs'; >>>>>>> import { shallow } from 'enzyme'; import { elementsTagTest, rootTagTest } from '../../utils/helpers/tags/tags-specs'; <<<<<<< it('renders with a <nav> tag as the root element', () => { expect(wrapper.is('nav')).toEqual(true); }); ======= describe("tags on component", () => { let wrapper = shallow(<Menu data-element='bar' data-role='baz'>Test</Menu>); it('include correct component, element and role data tags', () => { rootTagTest(wrapper, 'menu', 'bar', 'baz'); }); }); >>>>>>> it('renders with a <nav> tag as the root element', () => { expect(wrapper.is('nav')).toEqual(true); }); describe("tags on component", () => { let wrapper = shallow(<Menu data-element='bar' data-role='baz'>Test</Menu>); it('include correct component, element and role data tags', () => { rootTagTest(wrapper, 'menu', 'bar', 'baz'); }); });
<<<<<<< export const labelPreviewWidth = () => cy.iFrame(LABEL_PREVIEW_WIDTH); export const labelPreviewByText = () => cy.iFrame(LABEL_PREVIEW_WIDTH) .find('div[data-component="button-toggle"]') .find('label'); ======= export const dlsRoot = () => cy.iFrame(DLS_ROOT); export const buttonToggleGroupLabelPreview = () => dlsRoot().find('label').first(); export const labelPreviewWidth = () => cy.iFrame(LABEL_PREVIEW_WIDTH); >>>>>>> export const dlsRoot = () => cy.iFrame(DLS_ROOT); export const buttonToggleGroupLabelPreview = () => dlsRoot().find('label').first(); export const labelPreviewWidth = () => cy.iFrame(LABEL_PREVIEW_WIDTH); export const labelPreviewByText = () => cy.iFrame(LABEL_PREVIEW_WIDTH) .find('div[data-component="button-toggle"]') .find('label');
<<<<<<< date: new Date('2018-10-22'), changes: <>Added <SpellLink id={SPELLS.ARCHIVE_OF_THE_TITANS.id} /> module.</>, contributors: [niseko], }, { ======= date: new Date('2018-10-23'), changes: <>Added <ItemLink id={ITEMS.DREAD_GLADIATORS_MEDALLION.id} /> module.</>, contributors: [niseko], }, { date: new Date('2018-10-22'), changes: <>Added <SpellLink id={SPELLS.COASTAL_SURGE.id} /> module.</>, contributors: [niseko], }, { >>>>>>> date: new Date('2018-10-23'), changes: <>Added <SpellLink id={SPELLS.ARCHIVE_OF_THE_TITANS.id} /> module.</>, contributors: [niseko], }, { date: new Date('2018-10-23'), changes: <>Added <ItemLink id={ITEMS.DREAD_GLADIATORS_MEDALLION.id} /> module.</>, contributors: [niseko], }, { date: new Date('2018-10-22'), changes: <>Added <SpellLink id={SPELLS.COASTAL_SURGE.id} /> module.</>, contributors: [niseko], }, {
<<<<<<< // set the display name so the story source makes sense Textbox.displayName = 'Textbox'; ======= const defaultStoryPropsConfig = { inputWidthEnabled: true }; >>>>>>> // set the display name so the story source makes sense Textbox.displayName = 'Textbox'; const defaultStoryPropsConfig = { inputWidthEnabled: true }; <<<<<<< <Textbox { ...getTextboxStoryProps() } /> ======= <Textbox errorMessage={ text('errorMessage') } infoMessage={ text('infoMessage') } warningMessage={ text('warningMessage') } size={ select('size', OptionsHelper.sizesRestricted) } placeholder={ text('placeholder') } { ...getCommonTextboxStoryProps() } /> >>>>>>> <Textbox placeholder={ text('placeholder') } { ...getCommonTextboxStoryProps() } /> <<<<<<< <Textbox key='0' { ...getTextboxStoryProps() } />, <Textbox key='1' { ...getTextboxStoryProps() } /> ======= <Textbox errorMessage={ text('errorMessage') } infoMessage={ text('infoMessage') } warningMessage={ text('warningMessage') } size={ select('size', OptionsHelper.sizesRestricted) } placeholder={ text('placeholder') } key='0' { ...getCommonTextboxStoryProps() } />, <Textbox errorMessage={ text('errorMessage') } infoMessage={ text('infoMessage') } warningMessage={ text('warningMessage') } size={ select('size', OptionsHelper.sizesRestricted) } placeholder={ text('placeholder') } key='1' { ...getCommonTextboxStoryProps() } /> >>>>>>> <Textbox placeholder={ text('placeholder') } key='0' { ...getCommonTextboxStoryProps() } />, <Textbox placeholder={ text('placeholder') } key='1' { ...getCommonTextboxStoryProps() } />
<<<<<<< disablePortal, ======= listActionButton, onListAction, >>>>>>> disablePortal, listActionButton, onListAction, <<<<<<< { !disablePortal && isOpen && selectList } ======= { isOpen && ( <FilterableSelectList ref={ listboxRef } id={ selectListId.current } labelId={ labelId.current } anchorElement={ textboxRef.parentElement } onSelect={ onSelectOption } onSelectListClose={ onSelectListClose } filterText={ filterText } highlightedValue={ highlightedValue } noResultsMessage={ noResultsMessage } listActionButton={ listActionButton } onListAction={ handleOnListAction } > { children } </FilterableSelectList> ) } >>>>>>> { !disablePortal && isOpen && selectList }