Skip to content

Commit

Permalink
Merge pull request #591 from deriv-smarttrader/f-update-api-portal-urls
Browse files Browse the repository at this point in the history
Akmal / feat: update binary links to deriv
  • Loading branch information
balakrishna-deriv authored Dec 28, 2023
2 parents 538dc34 + 5de4318 commit edabbe1
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/javascript/_common/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const Url = (() => {

const default_domain = 'binary.com';
const host_map = { // the exceptions regarding updating the URLs
'bot.binary.com' : 'www.binary.bot',
'developers.binary.com': 'developers.binary.com', // same, shouldn't change
'academy.binary.com' : 'academy.binary.com',
'blog.binary.com' : 'blog.binary.com',
'bot.binary.com' : 'www.binary.bot',
'api.deriv.com' : 'api.deriv.com', // same, shouldn't change
'academy.binary.com': 'academy.binary.com',
'blog.binary.com' : 'blog.binary.com',
};

const urlForCurrentDomain = (href) => {
Expand Down
2 changes: 1 addition & 1 deletion src/javascript/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const getSocketURL = () => {
const is_real = loginid && !/^VRT/.test(loginid);
const server = isProduction() && is_real ? 'green' : 'blue';

server_url = `${server}.binaryws.com`;
server_url = `${server}.derivws.com`;
}
return `wss://${server_url}/websockets/v3`;
};
Expand Down
2 changes: 1 addition & 1 deletion src/javascript/landing_pages/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function urlFor(path) {

function wsConnect() {
const config_server = localStorage.getItem('config.server_url');
const server_url = config_server || 'frontend.binaryws.com';
const server_url = config_server || 'frontend.derivws.com';
endpointNotification(config_server);

return new WebSocket(`wss://${server_url}/websockets/v3?app_id=${getAppId()}&l=${getLanguage()}&brand=binary`);
Expand Down
2 changes: 1 addition & 1 deletion src/root_files/_common/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}

function openWSAndGetLanguage(cb) {
var ws = new WebSocket('wss://frontend.binaryws.com/websockets/v3?app_id=1&brand=binary');
var ws = new WebSocket('wss://frontend.derivws.com/websockets/v3?app_id=1&brand=binary');

ws.onopen = function() {
ws.send(JSON.stringify({ website_status: 1 }));
Expand Down
2 changes: 1 addition & 1 deletion src/root_files/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
if (lang) {
redirect();
} else {
var ws = new WebSocket('wss://frontend.binaryws.com/websockets/v3?app_id=1&brand=binary');
var ws = new WebSocket('wss://frontend.derivws.com/websockets/v3?app_id=1&brand=binary');
ws.onopen = function(e) {
ws.send(JSON.stringify({'website_status': '1'}));
};
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_common/_layout/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const Footer = () => (
header={it.L('Partner With Us')}
items={[
{ text: it.L('Affiliate and IB Programme'), href: it.url_for('affiliate-ib') },
{ text: it.L('API'), href: 'https://developers.binary.com', target: '_blank' },
{ text: it.L('API'), href: 'https://api.deriv.com', target: '_blank' },
{ text: it.L('Binary.com Shop'), href: 'https://shop.binary.com', target: '_blank' },
/* { text: it.L('Charitable Activities'), href: it.url_for('charity') }, */
{ text: it.L('All Partnership Options'), href: it.url_for('partners') },
Expand Down
4 changes: 2 additions & 2 deletions src/templates/app/endpoint.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const Endpoint = () => (
type='text'
label={it.L('Server')}
attributes={{ maxLength: 30 }}
hint={it.L('e.g. frontend.binaryws.com')}
hint={it.L('e.g. frontend.derivws.com')}
/>
<FormRow
id='app_id'
type='text'
label={it.L('OAuth App ID')}
attributes={{ maxLength: 5 }}
hint={it.L('You have to register and get App ID before you can use different OAuth server for authentication. For more information refer to OAuth details on https://developers.binary.com/.')}
hint={it.L('You have to register and get App ID before you can use different OAuth server for authentication. For more information refer to OAuth details on https://api.deriv.com/.')}
/>
</Fieldset>
<div className='center-text'>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/static/legal/api.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const Api = () => (
items={[
{
text: it.L('The Programmer must promptly report any security deficiencies in, or intrusions to, the Programmer\'s Application that the Programmer discovers to [_1] by writing in to [_2] or by raising a discussion thread on [_3] which is part of our [_4]. The Programmer will work with [_1] to immediately correct any security deficiency and will immediately disconnect any intrusions or intruders. In the event of any security deficiency or intrusion involving the Application, APIs, or Content, the Programmer will make no public statements (e.g. press, blogs, social media, bulletin boards, etc.) without prior written and express permission from [_1] in each instance.', it.website_name,
'<a href="https://hackerone.com/binary" target="_blank" rel="noopener noreferrer">Hackerone</a>', '<a href="https://binary.vanillacommunity.com" target="_blank" rel="noopener noreferrer">Vanilla Community</a>', '<a href="https://developers.binary.com" target="_blank" rel="noopener noreferrer">Developer Site</a>'),
'<a href="https://hackerone.com/deriv" target="_blank" rel="noopener noreferrer">Hackerone</a>', '<a href="https://deriv.vanillacommunity.com" target="_blank" rel="noopener noreferrer">Vanilla Community</a>', '<a href="https://api.deriv.com" target="_blank" rel="noopener noreferrer">Developer Site</a>'),
},
]}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/static/partners/partners.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Partners = () => (
text={it.L('Apply to become a Payment Agent')}
/>
<Column
url='https://developers.binary.com'
url='https://api.deriv.com'
target='_blank'
image='api'
header={it.L('API')}
Expand Down

0 comments on commit edabbe1

Please sign in to comment.