OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / identity / saga / migrate-recovery-phrase.saga.js

1 lines · javascript ref:
(function(_0x29b7b8,_0x30ccb6){const _0x33de4={_0x73492c:0x464,_0x5893d1:0x468,_0x2f39bd:0x46d,_0x507a39:0x235,_0x7c83e3:0x23c,_0xc77ee7:0x22e,_0x23653d:0x237,_0xed9899:0x237,_0x2caa92:0x46c,_0x18d922:0x466,_0x156be9:0x474,_0x136683:0x46f,_0x31917f:0x47a,_0x487aa2:0x46c,_0x1d8696:0x475,_0x3c3233:0x473,_0xe216e:0x478,_0x499ad4:0x47c,_0x28f5ad:0x478,_0x354349:0x232,_0xa76914:0x240,_0x13808e:0x23b,_0x7738e0:0x47b,_0x50e82e:0x476,_0x40c2aa:0x236,_0x4b8977:0x24a,_0x1935d1:0x244,_0x5bdb31:0x241,_0x50d754:0x46e,_0x52d860:0x472,_0x4dd598:0x470},_0x235f93={_0x152344:0x378},_0x4a2cf8={_0x41d059:0x33a};function _0x530766(_0x1ec4c6,_0x57f056,_0x2bafd7,_0xd2fd17){return _0x3812(_0xd2fd17-_0x4a2cf8._0x41d059,_0x57f056);}const _0x27e711=_0x29b7b8();function _0x36d455(_0x28e901,_0x49e31a,_0x24e9f9,_0x446c31){return _0x3812(_0x446c31- -_0x235f93._0x152344,_0x28e901);}while(!![]){try{const _0x5573f9=parseInt(_0x530766(0x46b,_0x33de4._0x73492c,_0x33de4._0x5893d1,_0x33de4._0x2f39bd))/(0x5*0x737+-0x154a+-0x1*0xec8)+-parseInt(_0x36d455(-0x240,-0x22c,-0x22a,-_0x33de4._0x507a39))/(0x35*0xb8+0x851+-0x2e67)*(parseInt(_0x36d455(-_0x33de4._0x7c83e3,-_0x33de4._0xc77ee7,-_0x33de4._0x23653d,-_0x33de4._0xed9899))/(-0x1*0x20cf+-0x2493*-0x1+0x1*-0x3c1))+-parseInt(_0x530766(_0x33de4._0x2caa92,_0x33de4._0x18d922,_0x33de4._0x156be9,_0x33de4._0x136683))/(0x9*-0x29d+0x1*0x1df6+-0x2f*0x23)*(-parseInt(_0x530766(_0x33de4._0x31917f,_0x33de4._0x487aa2,_0x33de4._0x31917f,_0x33de4._0x1d8696))/(0xa*-0x76+-0x774*-0x2+-0xa47))+-parseInt(_0x530766(_0x33de4._0x3c3233,_0x33de4._0xe216e,_0x33de4._0x499ad4,_0x33de4._0x28f5ad))/(0x2f9*-0xa+-0x1687+0x3447)+parseInt(_0x36d455(-_0x33de4._0x354349,-0x23d,-_0x33de4._0xa76914,-_0x33de4._0x13808e))/(0x202e+0x1ab7*0x1+-0x3ade)+parseInt(_0x530766(0x47b,_0x33de4._0x7738e0,0x481,_0x33de4._0x50e82e))/(0x239d+0x152*0x1+-0x24e7)+-parseInt(_0x36d455(-_0x33de4._0x40c2aa,-_0x33de4._0x4b8977,-_0x33de4._0x1935d1,-_0x33de4._0x5bdb31))/(-0x3*0x77b+-0x12e9*0x2+0x3c4c)*(-parseInt(_0x530766(0x47b,_0x33de4._0x50d754,_0x33de4._0x52d860,_0x33de4._0x4dd598))/(-0x1616+0x19a*0x9+0x7b6));if(_0x5573f9===_0x30ccb6)break;else _0x27e711['push'](_0x27e711['shift']());}catch(_0x6d071d){_0x27e711['push'](_0x27e711['shift']());}}}(_0x20ad,-0x4e9d*0xd+0x5b22b*0x1+0x6645d));function _0x3812(_0x3812e9,_0x5338e0){const _0x13cb32=_0x20ad();return _0x3812=function(_0x53c7ec,_0x44d638){_0x53c7ec=_0x53c7ec-(-0x19dc+-0x15d0+-0x35*-0xec);let _0x3e7bdf=_0x13cb32[_0x53c7ec];return _0x3e7bdf;},_0x3812(_0x3812e9,_0x5338e0);}const _0x308816=(function(){const _0x463a3a={_0x2cd5df:0x444,_0x1bd00e:0x443,_0x4911a5:0x43e};let _0x2897f5=!![];return function(_0x26a014,_0x45ecc5){const _0x4446d5={_0x5899de:0x305},_0x535c69=_0x2897f5?function(){function _0x34025f(_0x373ad5,_0x36d2c2,_0x5982f8,_0x303dc3){return _0x3812(_0x5982f8-_0x4446d5._0x5899de,_0x373ad5);}if(_0x45ecc5){const _0xb59021=_0x45ecc5[_0x34025f(_0x463a3a._0x2cd5df,_0x463a3a._0x1bd00e,_0x463a3a._0x4911a5,0x436)](_0x26a014,arguments);return _0x45ecc5=null,_0xb59021;}}:function(){};return _0x2897f5=![],_0x535c69;};}()),_0x868f9f=_0x308816(this,function(){const _0x1f6c47={_0x34468b:0x2aa,_0x41eb19:0x2b1,_0x17ae9d:0x2b2,_0x3337ac:0x170,_0x4c5016:0x173,_0x4377e0:0x16c,_0x264238:0x178,_0x4a7c15:0x185,_0x5bdfa8:0x183,_0x100aa0:0x17c,_0x3415a0:0x180,_0x27cdf7:0x18a,_0x5721aa:0x188,_0x20c837:0x190,_0x4d2268:0x2b9,_0x511603:0x2a9,_0x44d218:0x169,_0x5396e4:0x17c,_0x23696b:0x2ad,_0x593c73:0x2a8},_0x2b2487={_0x151613:0x43},_0x1c87aa={_0x37af91:0x16d};function _0x1bd991(_0x1b6ec6,_0x207140,_0x303840,_0x27ba98){return _0x3812(_0x27ba98-_0x1c87aa._0x37af91,_0x1b6ec6);}function _0x15fbf5(_0x27371c,_0x5cd33c,_0x34c3ae,_0x7dc80e){return _0x3812(_0x34c3ae-_0x2b2487._0x151613,_0x7dc80e);}return _0x868f9f[_0x1bd991(_0x1f6c47._0x34468b,_0x1f6c47._0x41eb19,0x2ac,_0x1f6c47._0x17ae9d)]()[_0x15fbf5(0x16e,_0x1f6c47._0x3337ac,_0x1f6c47._0x4c5016,_0x1f6c47._0x4377e0)](_0x15fbf5(_0x1f6c47._0x264238,_0x1f6c47._0x4a7c15,_0x1f6c47._0x5bdfa8,_0x1f6c47._0x100aa0)+'+$')[_0x15fbf5(_0x1f6c47._0x3415a0,_0x1f6c47._0x27cdf7,_0x1f6c47._0x5721aa,_0x1f6c47._0x20c837)]()[_0x1bd991(_0x1f6c47._0x4d2268,_0x1f6c47._0x511603,_0x1f6c47._0x511603,_0x1f6c47._0x41eb19)+'r'](_0x868f9f)[_0x15fbf5(_0x1f6c47._0x44d218,_0x1f6c47._0x5396e4,0x173,0x168)](_0x1bd991(0x2ac,_0x1f6c47._0x23696b,_0x1f6c47._0x593c73,_0x1f6c47._0x23696b)+'+$');});_0x868f9f();import{put,select,takeLeading,take}from'redux-saga/effects';import{taskErrorSaga}from'../../error';import{getIdentityShouldMigrateRecoveryPhrase,migrateRecoveryPhraseCmd,setMigrateRecoveryPhrase,migrateRecoveryPhraseDeclineCmd,migrateRecoveryPhraseResetFormCmd}from'../identity.reducer';function _0x20ad(){const _0x59adac=['ASE_DECLIN','89325xrHLag','storeRecov','44oHWjbO','2510YnpjHh','11943nyTWmP','MIGRATE_RE','apply','COVERY_PHR','208110zZzzMv','3664040krawUl','4694816NsUSkE','3571410FjJzph','eCmdHandle','(((.+)+)+)','5649RbBiZm','migrateRec','938rSJglf','constructo','toString','search','payload'];_0x20ad=function(){return _0x59adac;};return _0x20ad();}import{PREFERENCES,preferenceUpdateTask}from'../../preferences';import{normalizeRecoveryPhrase}from'../identity.model';import{getCoreBackend}from'../../../backend';import{apiCall}from'../../../api/core';const RECOVERY_PHRASE_MANY_RETRIES=-0xa9e+-0x3*0x2ea+0x135f;export function*migrateRecoveryPhraseDeclineCmdHandler(){const _0x433b94={_0x5b08b7:0x1cc,_0x54cea0:0x1d2,_0x13dd45:0x1d6,_0x73ab94:0x1d3,_0x2b0d12:0x1d0,_0x355aad:0x1d4,_0x55395a:0x1cc,_0x4dde38:0x1c6,_0x226076:0x1cd},_0x500fe5={_0x32c595:0x9a},_0x4baaec={_0x1c53af:0x2ac};function _0x8d1ecd(_0x21a9f4,_0x46f9f4,_0x3ff320,_0x31a9de){return _0x3812(_0x31a9de- -_0x4baaec._0x1c53af,_0x46f9f4);}function _0x4e315d(_0x46a99e,_0x28bb11,_0x3bba23,_0x32a6e8){return _0x3812(_0x28bb11-_0x500fe5._0x32c595,_0x46a99e);}yield preferenceUpdateTask(PREFERENCES[_0x4e315d(_0x433b94._0x5b08b7,_0x433b94._0x54cea0,_0x433b94._0x13dd45,0x1d8)+_0x4e315d(_0x433b94._0x73ab94,0x1d4,_0x433b94._0x5b08b7,_0x433b94._0x2b0d12)+_0x4e315d(_0x433b94._0x355aad,_0x433b94._0x55395a,_0x433b94._0x4dde38,_0x433b94._0x226076)+'ED'],!![]);}export function*migrateRecoveryPhraseResetFormCmdHandler(){yield put(setMigrateRecoveryPhrase({'loading':![],'error':![]}));}export function*migrateRecoveryPhraseSaga(){const _0x467d75={_0x1c417b:0x3e6,_0x5a2797:0x3e7,_0x4ad825:0x3e2,_0x316c51:0x3eb,_0x40c1b2:0x17c,_0x3362d1:0x16e,_0x48a4ee:0x171,_0x1ea832:0x176,_0x538b27:0x402,_0x10bda8:0x3f4,_0x68a741:0x3fc,_0x14b907:0x16f,_0x4f2355:0x166},_0x4fb14b={_0x11cd4e:0x2a5},_0x5ead22=yield select(getIdentityShouldMigrateRecoveryPhrase);if(!_0x5ead22)return;yield takeLeading(migrateRecoveryPhraseDeclineCmd,migrateRecoveryPhraseDeclineCmdHandler);function _0x2f4bd2(_0x3bd1fc,_0x345c85,_0x28e602,_0x1ba669){return _0x3812(_0x1ba669-0x2ba,_0x3bd1fc);}yield takeLeading(migrateRecoveryPhraseResetFormCmd,migrateRecoveryPhraseResetFormCmdHandler);let _0x17a275=-0x40*-0x4+-0x4b0*0x7+0x1fd*0x10;function _0x4a9a87(_0x5e535a,_0x280d90,_0x52c52f,_0x5edb3d){return _0x3812(_0x52c52f- -_0x4fb14b._0x11cd4e,_0x280d90);}while(!![]){const _0x26592a=yield take(migrateRecoveryPhraseCmd),_0x4ed452=normalizeRecoveryPhrase(_0x26592a[_0x2f4bd2(_0x467d75._0x1c417b,_0x467d75._0x5a2797,_0x467d75._0x4ad825,_0x467d75._0x316c51)]);_0x17a275+=-0x23*-0xef+-0x7*0x332+0xa4e*-0x1;try{yield put(setMigrateRecoveryPhrase({'error':![],'loading':!![]}));const _0x236849=getCoreBackend();yield apiCall(_0x236849[_0x4a9a87(-_0x467d75._0x40c1b2,-_0x467d75._0x3362d1,-_0x467d75._0x48a4ee,-_0x467d75._0x1ea832)+'eryPhrase'],_0x4ed452),yield put(setMigrateRecoveryPhrase({'loading':![],'error':![],'success':!![]}));}catch(_0x405c73){yield put(setMigrateRecoveryPhrase({'loading':![],'error':!![],'manyRetries':_0x17a275>RECOVERY_PHRASE_MANY_RETRIES})),taskErrorSaga(_0x2f4bd2(_0x467d75._0x538b27,_0x467d75._0x10bda8,0x402,_0x467d75._0x68a741)+'overyPhras'+_0x4a9a87(-_0x467d75._0x14b907,-0x16a,-_0x467d75._0x4f2355,-_0x467d75._0x4f2355)+'r',_0x405c73);}}}