From 3a184ff5782d2483b769169804ddef3cd1fa31e2 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Fri, 3 Apr 2020 18:17:13 +0100 Subject: [PATCH] ADD: avatars in HodlHodl offers list --- class/hodl-hodl-api.js | 11 ++++++++++- screen/wallets/hodlHodl.js | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/class/hodl-hodl-api.js b/class/hodl-hodl-api.js index fbdc7d0b6..b7bfcf5b3 100644 --- a/class/hodl-hodl-api.js +++ b/class/hodl-hodl-api.js @@ -52,6 +52,15 @@ export class HodlHodlApi { }; } + _getHeadersWithoutAuthorization() { + return { + headers: { + 'Access-Control-Allow-Origin': '*', + 'Content-Type': 'application/json', + }, + }; + } + async getCountries() { let response = await this._api.get('/api/v1/countries', this._getHeaders()); @@ -120,7 +129,7 @@ export class HodlHodlApi { for (let key in pagination) { uri.push('pagination[' + key + ']=' + pagination[key]); } - let response = await this._api.get('/api/v1/offers?' + uri.join('&'), this._getHeaders()); + let response = await this._api.get('/api/v1/offers?' + uri.join('&'), this._getHeadersWithoutAuthorization()); let json = response.body; if (!json || !json.offers || json.status === 'error') { diff --git a/screen/wallets/hodlHodl.js b/screen/wallets/hodlHodl.js index 2c00d302a..e27feb9fe 100644 --- a/screen/wallets/hodlHodl.js +++ b/screen/wallets/hodlHodl.js @@ -852,8 +852,9 @@ export default class HodlHodl extends Component {