Skip to content

Commit

Permalink
fix(Swap): fixed failure-reason endpoint application type
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-blockchain committed Feb 18, 2019
1 parent c4da806 commit 322593c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -734,10 +734,9 @@ export default ({ api, coreSagas, networks }) => {
const source = prop('source', form)
const target = prop('target', form)
const pair = getCurrentPair(form)
let trade, depositCredentials
try {
depositCredentials = yield call(getDepositCredentials, source)
trade = yield call(createTrade, source, target, pair)
const depositCredentials = yield call(getDepositCredentials, source)
const trade = yield call(createTrade, source, target, pair)
yield call(depositFunds, trade, source, depositCredentials)
yield put(actions.form.stopSubmit(CONFIRM_FORM))
yield put(actions.router.push('/swap/history'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ export default ({ nabuUrl, post, put, get }) => {
let failureReason = null
if (typeof err === 'string') failureReason = { message: err }
if (isObject(err)) failureReason = err
put({
return put({
url: nabuUrl,
endPoint: `/trades/${tradeId}/failure-reason`,
contentType: 'application/json',
data: {
txHash,
failureReason
Expand Down

0 comments on commit 322593c

Please sign in to comment.