summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/lib/ipc-facade.js4
-rw-r--r--test/mocks/ipc.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/lib/ipc-facade.js b/app/lib/ipc-facade.js
index ad91f43427..107cb3419d 100644
--- a/app/lib/ipc-facade.js
+++ b/app/lib/ipc-facade.js
@@ -16,7 +16,9 @@ export type Location = {
};
const LocationSchema = object({
country: string,
+ country_code: string,
city: string,
+ city_code: string,
position: arrayOf(number),
});
@@ -167,7 +169,7 @@ export class RealIpc implements IpcFacade {
}
getLocation(): Promise<Location> {
- return this._ipc.send('get_location')
+ return this._ipc.send('get_current_location')
.then(raw => {
try {
const validated: any = validate(LocationSchema, raw);
diff --git a/test/mocks/ipc.js b/test/mocks/ipc.js
index 367332d3c6..db5d6e3d8c 100644
--- a/test/mocks/ipc.js
+++ b/test/mocks/ipc.js
@@ -47,8 +47,10 @@ export function newMockIpc() {
getPublicIp: () => Promise.resolve('1.2.3.4'),
getLocation: () => Promise.resolve({
- city: '',
country: '',
+ country_code: '',
+ city: '',
+ city_code: '',
position: [0, 0],
}),