Skip to content

Commit

Permalink
Merge pull request #1591 from blockchain/release/4.12
Browse files Browse the repository at this point in the history
Release/4.12
  • Loading branch information
plondon committed May 3, 2019
2 parents b4cea89 + 21036ec commit 0f41260
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockchain-wallet-v4",
"version": "4.12.22",
"version": "4.12.24",
"license": "AGPL-3.0-or-later",
"private": true,
"author": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ const StyledCreatableSelect = styled(CreatableSelect)`
.bc__placeholder {
color: ${props => props.theme['gray-2']};
& + div {
width: 100%;
z-index: 2;
}
}
.bc__input {
width: 100%;
input {
width: 100% !important;
}
}
${props =>
Expand Down Expand Up @@ -67,6 +78,9 @@ const StyledCreatableSelect = styled(CreatableSelect)`
.bc__value-container {
cursor: text;
> div {
width: 100%;
}
}
.bc__clear-indicator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,9 @@ export default ({ api, coreSagas, networks }) => {
const erc20List = (yield select(
selectors.core.walletOptions.getErc20CoinList
)).getOrFail()
const currentError = yield select(formErrorSelector)
try {
yield put(A.setTxError(null))
if (coin !== 'ETH' && !includes(coin, erc20List)) return
yield put(actions.form.startAsyncValidation(EXCHANGE_FORM))
const provisionalPayment = yield call(getProvisionalPayment, false)
if (provisionalPayment.unconfirmedTx) throw LATEST_TX_ERROR
} catch (e) {
Expand All @@ -388,9 +386,6 @@ export default ({ api, coreSagas, networks }) => {
e === LATEST_TX_ERROR ? LATEST_TX_ERROR : LATEST_TX_FETCH_FAILED_ERROR
)
)
} finally {
const errors = currentError ? { _error: currentError } : undefined
yield put(actions.form.stopAsyncValidation(EXCHANGE_FORM, errors))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ import { actions, selectors } from 'data'
export default () => {
const refreshClicked = function * () {
try {
// Data (balance)
yield put(actions.core.data.bch.fetchData())
yield put(actions.core.data.btc.fetchData())
yield put(actions.core.data.eth.fetchData())
yield put(actions.core.data.xlm.fetchData())
yield put(actions.core.data.eth.fetchErc20Data('pax'))
// Rates
yield put(actions.core.data.bch.fetchRates())
yield put(actions.core.data.btc.fetchRates())
yield put(actions.core.data.eth.fetchRates())
yield put(actions.core.data.xlm.fetchRates())
yield put(actions.core.data.eth.fetchErc20Rates('pax'))
const pathname = yield select(selectors.router.getPathname)
switch (true) {
case contains('/bch/transactions', pathname):
Expand All @@ -27,6 +31,9 @@ export default () => {
case contains('/eth/transactions', pathname):
yield call(refreshEthTransactions)
break
case contains('/pax/transactions', pathname):
yield call(refreshErc20Transactions, 'pax')
break
case contains('/xlm/transactions', pathname):
yield call(refreshXlmTransactions)
break
Expand Down Expand Up @@ -66,6 +73,10 @@ export default () => {
yield put(actions.core.data.eth.fetchTransactions(null, true))
}

const refreshErc20Transactions = function * (coin) {
yield put(actions.core.data.eth.fetchErc20Transactions(coin, true))
}

const refreshXlmTransactions = function * () {
yield put(actions.core.data.xlm.fetchTransactions(null, true))
}
Expand Down
3 changes: 3 additions & 0 deletions packages/blockchain-wallet-v4/src/network/api/xlm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export default ({ apiUrl, horizonUrl, network, get }) => {

const getXlmAccount = publicKey => server.loadAccount(publicKey)

const getTimebounds = waitTime => server.fetchTimebounds(waitTime)

const getXlmFees = () =>
get({
url: apiUrl,
Expand Down Expand Up @@ -76,6 +78,7 @@ export default ({ apiUrl, horizonUrl, network, get }) => {
getXlmFees,
getXlmTransactions,
getXlmTicker,
getTimebounds,
pushXlmTx
}
}
13 changes: 8 additions & 5 deletions packages/blockchain-wallet-v4/src/redux/payment/xlm/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,21 @@ export default ({ api }) => {
if (!to) throw new Error(NO_DESTINATION_ERROR)
if (!amount) throw new Error(NO_AMOUNT_ERROR)
account = yield call(getAccountAndSequenceNumber, account)
const txBuilder = new StellarSdk.TransactionBuilder(account, { fee })
const timeout = (yield select(
S.walletOptions.getXlmSendTimeOutSeconds
)).getOrElse(300)
const timebounds = yield call(api.getTimebounds, timeout)
const txBuilder = new StellarSdk.TransactionBuilder(account, {
fee,
timebounds
})
const operation = yield call(
createOperation,
to,
amount,
destinationAccountExists
)
txBuilder.addOperation(operation)
const timeout = (yield select(
S.walletOptions.getXlmSendTimeOutSeconds
)).getOrElse(10)
txBuilder.setTimeout(timeout)
if (memo && memoType) {
txBuilder.addMemo(StellarSdk.Memo[memoType](memo))
}
Expand Down

0 comments on commit 0f41260

Please sign in to comment.