From d3980f1de4dba88202255bebfc795636ed1a05f4 Mon Sep 17 00:00:00 2001 From: Esteban Mino Date: Fri, 8 Nov 2019 19:33:03 -0300 Subject: [PATCH] set selected address --- src/user/PreferencesController.ts | 9 +++++++++ tests/PreferencesController.test.ts | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/src/user/PreferencesController.ts b/src/user/PreferencesController.ts index 077bac575d..728593bf67 100644 --- a/src/user/PreferencesController.ts +++ b/src/user/PreferencesController.ts @@ -231,6 +231,15 @@ export class PreferencesController extends BaseController { controller.setIpfsGateway('https://ipfs.infura.io/ipfs/'); expect(controller.state.ipfsGateway).toEqual('https://ipfs.infura.io/ipfs/'); }); + + it('should update selected address as checksummed', () => { + const controller = new PreferencesController(); + controller.setSelectedAddress('0x95d2bc047b0ddec1e4a178eeb64d59f5e735cd0a'); + expect(controller.state.selectedAddress).toEqual('0x95D2bC047B0dDEc1E4A178EeB64d59F5E735cd0A'); + }); });