@dcl/linker-dapp 0.2.0 → 0.2.2-2090471827.commit-84b7063

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/asset-manifest.json +3 -3
  2. package/index.html +1 -1
  3. package/package.json +2 -2
  4. package/static/js/main.41591ec4.chunk.js +2 -0
  5. package/static/js/main.41591ec4.chunk.js.map +1 -0
  6. package/types/components/Error.d.ts +5 -0
  7. package/types/components/IdentityPage/IdentityPage.container.d.ts +3 -0
  8. package/types/components/IdentityPage/IdentityPage.d.ts +4 -0
  9. package/types/components/IdentityPage/index.d.ts +2 -0
  10. package/types/components/IdentityPage/types.d.ts +16 -0
  11. package/types/components/LandInfo/LandInfo.d.ts +3 -0
  12. package/types/components/LandInfo/types.d.ts +5 -0
  13. package/types/components/LinkerPage/LinkerPage.container.d.ts +3 -0
  14. package/types/components/LinkerPage/LinkerPage.d.ts +4 -0
  15. package/types/components/LinkerPage/index.d.ts +2 -0
  16. package/types/components/LinkerPage/types.d.ts +25 -0
  17. package/types/components/RenderWalletData/RenderWalletData.d.ts +3 -0
  18. package/types/components/RenderWalletData/types.d.ts +11 -0
  19. package/types/components/Root.d.ts +3 -0
  20. package/types/config.d.ts +17 -0
  21. package/types/contracts.d.ts +3 -0
  22. package/types/index.d.ts +2 -0
  23. package/types/modules/authorization/actions.d.ts +16 -0
  24. package/types/modules/authorization/reducer.d.ts +9 -0
  25. package/types/modules/authorization/sagas.d.ts +1 -0
  26. package/types/modules/authorization/selectors.d.ts +6 -0
  27. package/types/modules/authorization/types.d.ts +4 -0
  28. package/types/modules/land/actions.d.ts +14 -0
  29. package/types/modules/land/reducer.d.ts +9 -0
  30. package/types/modules/land/sagas.d.ts +1 -0
  31. package/types/modules/land/selectors.d.ts +5 -0
  32. package/types/modules/land/types.d.ts +9 -0
  33. package/types/modules/land/utils.d.ts +3 -0
  34. package/types/modules/server/utils.d.ts +20 -0
  35. package/types/modules/signature/actions.d.ts +27 -0
  36. package/types/modules/signature/reducer.d.ts +11 -0
  37. package/types/modules/signature/sagas.d.ts +1 -0
  38. package/types/modules/signature/selectors.d.ts +5 -0
  39. package/types/modules/wallet/sagas.d.ts +1 -0
  40. package/types/modules/wallet/selectors.d.ts +5 -0
  41. package/types/reducer.d.ts +2 -0
  42. package/types/sagas.d.ts +1 -0
  43. package/types/store.d.ts +1 -0
  44. package/types/types.d.ts +14 -0
  45. package/static/js/main.faca3684.chunk.js +0 -2
  46. package/static/js/main.faca3684.chunk.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "/static/css/main.6c8c18c2.chunk.css",
4
- "main.js": "/static/js/main.faca3684.chunk.js",
5
- "main.js.map": "/static/js/main.faca3684.chunk.js.map",
4
+ "main.js": "/static/js/main.41591ec4.chunk.js",
5
+ "main.js.map": "/static/js/main.41591ec4.chunk.js.map",
6
6
  "runtime-main.js": "/static/js/runtime-main.4d07cd54.js",
7
7
  "runtime-main.js.map": "/static/js/runtime-main.4d07cd54.js.map",
8
8
  "static/css/2.83b72b22.chunk.css": "/static/css/2.83b72b22.chunk.css",
@@ -22,6 +22,6 @@
22
22
  "static/css/2.83b72b22.chunk.css",
23
23
  "static/js/2.c85ef134.chunk.js",
24
24
  "static/css/main.6c8c18c2.chunk.css",
25
- "static/js/main.faca3684.chunk.js"
25
+ "static/js/main.41591ec4.chunk.js"
26
26
  ]
27
27
  }
package/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="CLI Linker for deployments"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Linker App</title><link href="/static/css/2.83b72b22.chunk.css" rel="stylesheet"><link href="/static/css/main.6c8c18c2.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],c=r[1],l=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"deb33fb3"}[e]+".chunk.js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonp@dcl/linker-dapp"]=this["webpackJsonp@dcl/linker-dapp"]||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var l=0;l<a.length;l++)r(a[l]);var f=c;t()}([])</script><script src="/static/js/2.c85ef134.chunk.js"></script><script src="/static/js/main.faca3684.chunk.js"></script></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="CLI Linker for deployments"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Linker App</title><link href="/static/css/2.83b72b22.chunk.css" rel="stylesheet"><link href="/static/css/main.6c8c18c2.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],c=r[1],l=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,l||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{3:"deb33fb3"}[e]+".chunk.js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(l);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/",i.oe=function(e){throw console.error(e),e};var a=this["webpackJsonp@dcl/linker-dapp"]=this["webpackJsonp@dcl/linker-dapp"]||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var l=0;l<a.length;l++)r(a[l]);var f=c;t()}([])</script><script src="/static/js/2.c85ef134.chunk.js"></script><script src="/static/js/main.41591ec4.chunk.js"></script></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/linker-dapp",
3
- "version": "0.2.0",
3
+ "version": "0.2.2-2090471827.commit-84b7063",
4
4
  "description": "The website for decentraland's linker ",
5
5
  "main": "website.js",
6
6
  "scripts": {
@@ -16,5 +16,5 @@
16
16
  "url": "https://github.com/decentraland/linker-dapp/issues"
17
17
  },
18
18
  "homepage": "",
19
- "commit": "bdc379f7927c12051743c78fc085adfc9b1236e9"
19
+ "commit": "84b70630628528476189db9d9d0104c7aa5b6f90"
20
20
  }
@@ -0,0 +1,2 @@
1
+ (this["webpackJsonp@dcl/linker-dapp"]=this["webpackJsonp@dcl/linker-dapp"]||[]).push([[0],{1004:function(e,t){},1006:function(e,t){},1018:function(e,t){},1039:function(e,t){},1041:function(e,t){},1319:function(e,t){},1339:function(e,t){},1340:function(e,t){},1717:function(e,t,n){},1922:function(e,t,n){},1925:function(e,t,n){"use strict";n.r(t);var a,s=n(152),r=n.n(s),i=n(802),u=n.n(i),o=n(189),p=n(168),c=n(834),d=n(816),l=n(817),y=n(818),m=n(344),f=n(101);function b(e){return e?("string"===typeof e?[e]:e).map((function(e){var t=e.split(","),n=Object(m.a)(t,2),a=n[0],s=n[1];return{x:parseInt(a,10),y:parseInt(s,10)}})):[{x:0,y:0}]}function v(){!function(){var e,t,n=new URLSearchParams(window.location.search);a={baseParcel:b(n.get("baseParcel"))[0],parcels:b(n.getAll("parcels")),wearableId:n.get("wearableId")||void 0,rootCID:n.get("rootCID")||"QmPjpPyibbryTCi75zzcdeuPUBcujtEqj43shwKBAdMojy",debug:"true"===n.get("debug"),estateRegistry:n.get("estateRegistry"),landRegistry:n.get("landRegistry"),chainId:"0x1"===(null===(e=window)||void 0===e||null===(t=e.ethereum)||void 0===t?void 0:t.chainId)?f.ChainId.ETHEREUM_MAINNET:f.ChainId.ETHEREUM_ROPSTEN}}()}function x(){var e,t;return"0x1"!==(null===(e=window)||void 0===e||null===(t=e.ethereum)||void 0===t?void 0:t.chainId)}function g(){var e;return!!(null===(e=a)||void 0===e?void 0:e.debug)}function j(e){return a[e]}var O=n(819),w=n(820),h=n(57),M=n(87),I=n(80),_="[Request] Fetch LAND",k="[Success] Fetch LAND",C="[Failure] Fetch LAND",A=function(e){return Object(I.action)(k,{land:e})},E={data:{},loading:[],error:null},L="[Request] Sign Content",R="[Success] Sign Content",U="[Failure] Sign Content",S=function(e){return Object(I.action)(U,{error:e})},D="[Request] Create Identity",T="[Success] Create Identity",z="[Failure] Create Identity",N=function(e){return Object(I.action)(T,{identity:e})},P={data:"",loading:[],identity:null,error:null},F="[Request] Fetch LAND Authorizations",W="[Success] Fetch LAND Authorizations",B="[Failure] Fetch LAND Authorizations",H=function(e){return Object(I.action)(W,{authorizations:e})},q={data:[],loading:[],error:null},J=Object(p.b)({wallet:O.walletReducer,transaction:w.transactionReducer,land:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t)});case k:return{loading:Object(M.loadingReducer)(e.loading,t),data:t.payload.land,error:null};case C:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),error:t.payload.error});default:return e}},signature:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case L:case D:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t)});case R:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),data:t.payload.signature,error:null});case U:case z:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),error:t.payload.error});case T:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),identity:t.payload.identity,error:null});default:return e}},authorization:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t)});case W:return{loading:Object(M.loadingReducer)(e.loading,t),data:t.payload.authorizations,error:null};case B:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),error:t.payload.error});default:return e}}}),G=n(1),K=n.n(G),Y=n(34),X=n(94),Q=n(821),V=n(22),Z=n(187),$=n(153),ee=n(471),te=n(822),ne=n(823),ae={};function se(){return re.apply(this,arguments)}function re(){return(re=Object(V.a)(K.a.mark((function e(){var t,n,a;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ae.land){e.next=5;break}return e.next=3,Object($.getConnectedProvider)();case 3:(t=e.sent)&&(n=j("landRegistry"),a=n||(x()?"0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b":"0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d"),ae.land=new Z.b(a,ne.a,new ee.a(t).getSigner()));case 5:return e.abrupt("return",ae.land);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(){return ue.apply(this,arguments)}function ue(){return(ue=Object(V.a)(K.a.mark((function e(){var t,n,a;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ae.estate){e.next=5;break}return e.next=3,Object($.getConnectedProvider)();case 3:(t=e.sent)&&(n=j("landRegistry"),a=n||(x()?"0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95":"0x959e104e1a4db6317fa58f8295f586e1a978c297"),ae.estate=new Z.b(a,te.a,new ee.a(t).getSigner()));case 5:return e.abrupt("return",ae.estate);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(e){var t=e.x,n=e.y;return"".concat(t,",").concat(n)}var pe=K.a.mark(le),ce=K.a.mark(ye),de=K.a.mark(me);function le(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeEvery)(_,ye);case 2:return e.next=4,Object(Y.takeEvery)(X.CONNECT_WALLET_SUCCESS,me);case 4:case"end":return e.stop()}}),pe)}function ye(e){var t,n,a,s,r,i;return K.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Object(Y.call)((function(){return se()}));case 2:return t=u.sent,u.prev=3,n=e.payload,a=n.x,s=n.y,u.next=7,Object(Y.call)((function(){return t.landData(a,s)}));case 7:if(!(r=u.sent)){u.next=14;break}return u.next=11,Object(Y.call)((function(){return fe(r)}));case 11:u.t0=u.sent,u.next=15;break;case 14:u.t0={version:0,name:"",description:""};case 15:return i=u.t0,u.next=18,Object(Y.put)(A(i));case 18:u.next=24;break;case 20:return u.prev=20,u.t1=u.catch(3),u.next=24,Object(Y.put)((o=u.t1.message,Object(I.action)(C,{error:o})));case 24:case"end":return u.stop()}var o}),ce,null,[[3,20]])}function me(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.put)((t=j("baseParcel"),Object(I.action)(_,t)));case 2:case"end":return e.stop()}var t}),de)}function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.charAt(0);if("0"===t){var n=Object(m.a)(Q.parse(e,{cellDelimiter:","})[0],4),a=n[0],s=n[1],r=n[2],i=n[3];return{version:a,name:s||"",description:r||"",ipns:i||""}}throw new Error('Unknown version when trying to decode land data: "'.concat(e,'"'))}var be=n(824),ve=K.a.mark(je),xe=K.a.mark(Oe),ge=K.a.mark(we);function je(){var e;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object(be.createWalletSaga)({CHAIN_ID:j("chainId")}),t.next=3,Object(Y.all)([e(),Oe()]);case 3:case"end":return t.stop()}}),ve)}function Oe(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeEvery)(X.CHANGE_NETWORK,we);case 2:return e.next=4,Object(Y.takeEvery)(X.CHANGE_ACCOUNT,we);case 4:case"end":return e.stop()}}),xe)}function we(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.call)((function(){return window.location.reload()}));case 2:case"end":return e.stop()}}),ge)}var he=n(74),Me=n(71),Ie=n(3);function _e(e,t){return ke.apply(this,arguments)}function ke(){return(ke=Object(V.a)(K.a.mark((function e(t,n){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/close?ok=".concat(t,"&reason=").concat(JSON.stringify(n)));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ce=n(825),Ae=K.a.mark(Se),Ee=K.a.mark(De),Le=K.a.mark(Te),Re=K.a.mark(ze),Ue=K.a.mark(Ne);function Se(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeLatest)(L,De);case 2:return e.next=4,Object(Y.takeEvery)(R,Te);case 4:return e.next=6,Object(Y.takeLatest)(D,ze);case 6:return e.next=8,Object(Y.takeLatest)(T,Ne);case 8:case"end":return e.stop()}}),Ae)}function De(e){var t,n,a,s,r,i;return K.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,t=Object(Me.f)(e.payload),u.next=4,Object(Y.call)((function(){return Object($.getConnectedProvider)()}));case 4:return n=u.sent,a=new ee.a(n),s=a.getSigner(),u.next=9,Object(Y.call)((function(){return s.getAddress()}));case 9:return r=u.sent,u.next=12,Object(Y.call)((function(){return n.send("personal_sign",[Object(Ie.i)(t),r.toLowerCase()])}));case 12:return i=u.sent,u.next=15,Object(Y.put)((o=i,Object(I.action)(R,{signature:o})));case 15:u.next=21;break;case 17:return u.prev=17,u.t0=u.catch(0),u.next=21,Object(Y.put)(S(u.t0.message));case 21:case"end":return u.stop()}var o}),Ee,null,[[0,17]])}function Te(e){var t,n,a;return K.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,Object(Y.select)(he.getAddress);case 2:return t=s.sent,s.next=5,Object(Y.select)(he.getChainId);case 5:return n=s.sent,a=e.payload.signature,s.prev=7,s.next=10,Object(Y.call)((function(){_e(!0,{responseType:"scene-deploy",payload:{signature:a,address:t,chainId:n}})}));case 10:s.next=16;break;case 12:return s.prev=12,s.t0=s.catch(7),s.next=16,Object(Y.put)(S(s.t0.message));case 16:case"end":return s.stop()}}),Le,null,[[7,12]])}function ze(e){var t,n,a,s;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(Y.call)((function(){return Object($.getConnectedProvider)()}));case 3:return t=e.sent,n=new ee.a(t),a=n.getSigner(),e.next=8,Object(Y.call)((function(){return Object(Ce.createIdentity)(a,1e3)}));case 8:return s=e.sent,e.next=11,Object(Y.put)(N(s));case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(0),console.log({error:e.t0}),e.next=18,Object(Y.put)((r=e.t0.message,Object(I.action)(z,{error:r})));case 18:case"end":return e.stop()}var r}),Re,null,[[0,13]])}function Ne(e){var t,n,a;return K.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.payload.identity,s.next=3,Object(Y.select)(he.getAddress);case 3:return n=s.sent,s.next=6,Object(Y.select)(he.getChainId);case 6:return a=s.sent,s.prev=7,s.next=10,Object(Y.call)((function(){_e(!0,{responseType:"identity",payload:{identity:t,address:n,chainId:a}})}));case 10:s.next=16;break;case 12:return s.prev=12,s.t0=s.catch(7),s.next=16,Object(Y.put)(S(s.t0.message));case 16:case"end":return s.stop()}}),Ue,null,[[7,12]])}var Pe=n(122),Fe=n(480),We=K.a.mark(qe),Be=K.a.mark(Je),He=K.a.mark(Ge);function qe(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeEvery)(X.CONNECT_WALLET_SUCCESS,Ge);case 2:return e.next=4,Object(Y.takeEvery)(F,Je);case 4:case"end":return e.stop()}}),We)}function Je(){var e,t;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(Y.call)((function(){return se()}));case 2:return e=n.sent,n.next=5,Object(Y.call)((function(){return ie()}));case 5:return t=n.sent,n.prev=6,n.delegateYield(K.a.mark((function n(){var a,s,r,i,u,o,p,c,d,l,y,m,f,b,v;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(Y.select)(he.getAddress);case 2:a=n.sent,s=new Map,r=[],i=Object(Fe.a)(j("parcels"));try{for(o=function(){var t=u.value,n=t.x,i=t.y,o=new Promise((function(r,u){e.encodeTokenId(n,i).then((function(o){e.isUpdateAuthorized(a,o).then((function(e){s.set(oe(t),o),r({x:n,y:i,isUpdateAuthorized:e})})).catch(u)})).catch(u)}));r.push(o)},i.s();!(u=i.n()).done;)o()}catch(x){i.e(x)}finally{i.f()}return n.next=9,Object(Y.call)((function(){return Promise.all(r)}));case 9:p=n.sent,c=p.filter((function(e){return!e.isUpdateAuthorized})),d=p.filter((function(e){return e.isUpdateAuthorized})),l=[],y=Object(Fe.a)(c);try{for(f=function(){var e=m.value,n=s.get(oe(e)),r=new Promise((function(s,r){t.getLandEstateId(n).then((function(n){return n&&n>0?t.isUpdateAuthorized(a,n).then((function(t){s(Object(h.a)(Object(h.a)({},e),{},{isUpdateAuthorized:t}))})):s(e)})).catch(r)}));l.push(r)},y.s();!(m=y.n()).done;)f()}catch(x){y.e(x)}finally{y.f()}return n.next=17,Object(Y.call)((function(){return Promise.all(l)}));case 17:return b=n.sent,v=[].concat(Object(Pe.a)(d),Object(Pe.a)(b)),n.next=21,Object(Y.put)(H(v));case 21:case"end":return n.stop()}}),n)}))(),"t0",8);case 8:n.next=14;break;case 10:return n.prev=10,n.t1=n.catch(6),n.next=14,Object(Y.put)((a=n.t1.message,Object(I.action)(B,{error:a})));case 14:case"end":return n.stop()}var a}),Be,null,[[6,10]])}function Ge(){var e;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Y.call)((function(){return he.getAddress}));case 2:return e=t.sent,t.next=5,Object(Y.put)((n=e,Object(I.action)(F,{owner:n})));case 5:case"end":return t.stop()}var n}),He)}n(1715),n(1716);var Ke=n(186),Ye=n(111),Xe=function(e){return e.signature},Qe=Object(Ye.a)(Xe,(function(e){return e.data})),Ve=Object(Ye.a)(Xe,(function(e){return e.loading.length>0})),Ze=(Object(Ye.a)(Xe,(function(e){return e.error})),n(1717),n(124)),$e=n(0),et=n.n($e),tt=n(30),nt=et.a.memo((function(e){var t=e.children;return Object(tt.jsxs)("p",{style:{color:"var(--primary)"},children:[" Error: ",t]})}));function at(e){var t=e.isConnected,n=e.isConnecting,a=e.wallet,s=e.authorizations,r=e.isUpdateAuthorized,i=e.onConnectWallet;return t&&a.address?Object(tt.jsxs)(tt.Fragment,{children:[Object(tt.jsxs)("p",{children:["Using address: \xa0",Object(tt.jsx)(Ze.Blockie,{scale:3,seed:a.address,children:Object(tt.jsx)(Ze.Address,{tooltip:!0,strong:!0,value:a.address})})]}),(null===s||void 0===s?void 0:s.length)&&!r?Object(tt.jsx)(nt,{children:"You don't have permissions to update The following LANDs that are part of the scene: ".concat((s||[]).filter((function(e){return!e.isUpdateAuthorized})).map((function(e){return'"'.concat(oe(e),'"')})).join(", "))}):null]}):Object(tt.jsxs)(tt.Fragment,{children:[n?null:Object(tt.jsx)("p",{children:"Could not find any wallet"}),Object(tt.jsx)("p",{children:Object(tt.jsx)(Ze.Button,{primary:!0,onClick:i,loading:n,disabled:n,children:"Reconnect\xa0"})})]})}var st=Object(o.connect)((function(e){return{wallet:Object(he.getData)(e),isConnected:Object(he.isConnected)(e),isConnecting:Object(he.isConnecting)(e),signed:!!Qe(e),isSigning:Ve(e)}}),(function(e){return{onConnectWallet:function(){return e(Object(X.enableWalletRequest)(Ke.ProviderType.INJECTED))},onRequestIdentity:function(){return e(Object(I.action)(D,{}))}}}))((function(e){var t=e.isConnected,n=e.wallet,a=e.isConnecting,s=e.onConnectWallet,r=e.isSigning,i=e.onRequestIdentity;return Object(tt.jsxs)("div",{className:"LinkScenePage",children:[x()&&Object(tt.jsx)("div",{className:"warning",children:"Using Ropsten test network"}),Object(tt.jsx)(Ze.Navbar,{}),Object(tt.jsx)(Ze.Header,{children:"Create an identity to sign deployments "}),Object(tt.jsx)(at,{isUpdateAuthorized:!0,isConnected:t,isConnecting:a,wallet:n,onConnectWallet:s}),Object(tt.jsx)("form",{children:Object(tt.jsx)("div",{children:Object(tt.jsx)(Ze.Button,{primary:!0,onClick:function(e){e.preventDefault(),i()},disabled:!t,loading:r,children:"Sign ephemeral wallet"})})})]})})),rt=function(e){return e.land},it=Object(Ye.a)(rt,(function(e){return e.data})),ut=Object(Ye.a)(rt,(function(e){return e.loading.length>0})),ot=Object(Ye.a)(rt,(function(e){return e.error})),pt=function(e){return e.authorization},ct=Object(Ye.a)(pt,(function(e){return e.data})),dt=Object(Ye.a)(pt,(function(e){return e.loading.length>0})),lt=(Object(Ye.a)(pt,(function(e){return e.error})),Object(Ye.a)(ct,(function(e){if(null===e||void 0===e?void 0:e.length)return e.every((function(e){return e.isUpdateAuthorized}))})));n(1922);function yt(e){var t,n=e.deployUrl,a=null!==(t=e.base.name)&&void 0!==t?t:"LAND without name",s=j("baseParcel"),r=s.x,i=s.y;return Object(tt.jsxs)("p",{children:["Updating ",Object(tt.jsx)("b",{children:a})," ",Object(tt.jsxs)("a",{href:n,target:"_blank",rel:"noreferrer",children:["at coordinates ",r,", ",i]})]})}var mt=Object(o.connect)((function(e){return{base:it(e),wallet:Object(he.getData)(e),isLandLoading:ut(e),isConnected:Object(he.isConnected)(e),isConnecting:Object(he.isConnecting)(e),error:ot(e),signed:!!Qe(e),isUpdateAuthorized:lt(e),authorizations:ct(e),isAuthorizationLoading:dt(e),isSigning:Ve(e)}}),(function(e){return{onConnectWallet:function(){return e(Object(X.enableWalletRequest)(Ke.ProviderType.INJECTED))},onSignContent:function(t){return e(function(e){return Object(I.action)(L,e)}(t))}}}))((function(e){var t=e.isConnected,n=e.wallet,a=e.authorizations,s=e.isUpdateAuthorized,r=e.isConnecting,i=e.onConnectWallet,u=e.isSigning,o=e.base,p=e.error,c=e.isAuthorizationLoading,d=e.signed,l=j("baseParcel"),y=l.x,m=l.y,b=j("rootCID"),v=(null===n||void 0===n?void 0:n.chainId)===f.ChainId.ETHEREUM_ROPSTEN,x=v?"zone":"org",O="https://play.decentraland.".concat(x,"/?position=").concat(y,",").concat(m);return Object(tt.jsxs)("div",{className:"LinkScenePage",children:[v&&Object(tt.jsx)("div",{className:"warning",children:"Using Ropsten test network"}),Object(tt.jsx)(Ze.Navbar,{}),Object(tt.jsx)(Ze.Header,{children:"Update LAND data"}),Object(tt.jsx)(at,{authorizations:a,isUpdateAuthorized:s,isConnected:t,isConnecting:r,wallet:n,onConnectWallet:i}),Object(tt.jsx)("div",{children:Object(tt.jsx)("img",{style:{maxWidth:"100%",maxHeight:"100%",width:"35%"},className:"map",src:"https://api.decentraland.".concat(x,"/v1/parcels/").concat(y,"/").concat(m,"/map.png"),alt:"Base parcel ".concat(y,",").concat(m)})}),Object(tt.jsx)(yt,{deployUrl:O,base:o}),Object(tt.jsxs)("p",{children:["Project CID: ",Object(tt.jsx)("b",{children:b})]}),t&&d&&Object(tt.jsxs)("p",{children:["Content was succesfully signed and it's being uploaded"," ",Object(tt.jsx)("a",{href:O,target:"_blank",rel:"noreferrer",children:"here"}),". You can close this page and check the CLI for more info."]}),Object(tt.jsx)("form",{children:Object(tt.jsx)("div",{children:Object(tt.jsx)(Ze.Button,{primary:!0,onClick:function(t){t.preventDefault(),(0,e.onSignContent)(j("rootCID"))},disabled:!t||!!p||c||!s,loading:u,children:"Sign and Deploy"})})}),p?g()?Object(tt.jsx)(nt,{children:p}):Object(tt.jsx)(nt,{children:"There was an unexpected error."}):null]})})),ft=function(e){return new URLSearchParams(document.location.search).has("wearableId")?Object(tt.jsx)(st,Object(h.a)({},e)):Object(tt.jsx)(mt,Object(h.a)({},e))};r.a.render(Object(tt.jsx)(o.Provider,{store:function(){v();var e=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||p.c,t=Object(y.createStorageMiddleware)({storageKey:"decentraland-linker"}),n=t.storageMiddleware,a=t.loadStorageMiddleware,s=Object(c.a)(),r=Object(l.createTransactionMiddleware)(),i=Object(d.createLogger)({collapsed:function(){return!0},predicate:function(e,t){return!1}}),u=e(Object(p.a)(s,i,n,r)),o=Object(p.d)(J,u);return s.run(K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.all)([je(),le(),Se(),qe()]);case 2:case"end":return e.stop()}}),e)}))),a(o),o}(),children:Object(tt.jsx)(u.a,{children:Object(tt.jsx)(ft,{})})}),document.getElementById("root"))},822:function(e){e.exports=JSON.parse('{"a":[{"constant":true,"inputs":[{"name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"updateManager","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"landIdEstate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"estateLandIds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"registry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"updateOperator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"estateLandIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"contractName","type":"string"},{"name":"migrationId","type":"string"}],"name":"isMigrated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":false,"name":"_data","type":"string"}],"name":"CreateEstate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_landId","type":"uint256"}],"name":"AddLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_landId","type":"uint256"},{"indexed":true,"name":"_destinatary","type":"address"}],"name":"RemoveLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_assetId","type":"uint256"},{"indexed":true,"name":"_holder","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_data","type":"string"}],"name":"Update","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_operator","type":"address"}],"name":"UpdateOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":true,"name":"_caller","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"UpdateManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_registry","type":"address"}],"name":"SetLANDRegistry","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"contractName","type":"string"},{"indexed":false,"name":"migrationId","type":"string"}],"name":"Migrated","type":"event"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"metadata","type":"string"}],"name":"mint","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"destinatary","type":"address"}],"name":"transferLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landIds","type":"uint256[]"},{"name":"destinatary","type":"address"}],"name":"transferManyLands","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"landId","type":"uint256"}],"name":"getLandEstateId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_registry","type":"address"}],"name":"setLANDRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ping","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getEstateSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"metadata","type":"string"}],"name":"updateMetadata","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getMetadata","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"estateId","type":"uint256"}],"name":"isUpdateAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"name":"setUpdateManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setLandUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_registry","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_operator","type":"address"},{"name":"_from","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"onERC721Received","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getFingerprint","outputs":[{"name":"result","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"},{"name":"fingerprint","type":"bytes"}],"name":"verifyFingerprint","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"estateIds","type":"uint256[]"}],"name":"safeTransferManyFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"estateIds","type":"uint256[]"},{"name":"data","type":"bytes"}],"name":"safeTransferManyFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"data","type":"string"}],"name":"updateLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landIds","type":"uint256[]"},{"name":"data","type":"string"}],"name":"updateManyLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]}')},823:function(e){e.exports=JSON.parse('{"a":[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"updateManager","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"assetId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"latestPing","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"assetId","type":"uint256"}],"name":"isAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"authorizedDeploy","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"assetId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"assetId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"tokensOf","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GET_METADATA","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"description","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"updateOperator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"authorized","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"assetId","type":"uint256"},{"name":"userData","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"estateRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetHolder","type":"address"},{"name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"getApprovedAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"registry","type":"address"}],"name":"EstateRegistrySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":true,"name":"holder","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"data","type":"string"}],"name":"Update","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":true,"name":"operator","type":"address"}],"name":"UpdateOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":true,"name":"_caller","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"UpdateManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_caller","type":"address"},{"indexed":true,"name":"_deployer","type":"address"}],"name":"DeployAuthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_caller","type":"address"},{"indexed":true,"name":"_deployer","type":"address"}],"name":"DeployForbidden","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":false,"name":"operator","type":"address"},{"indexed":false,"name":"userData","type":"bytes"},{"indexed":false,"name":"operatorData","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":false,"name":"operator","type":"address"},{"indexed":false,"name":"userData","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"authorized","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_prevOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"},{"constant":false,"inputs":[{"name":"","type":"bytes"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"assetId","type":"uint256"}],"name":"isUpdateAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"authorizeDeploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"forbidDeploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"beneficiary","type":"address"}],"name":"assignNewParcel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"beneficiary","type":"address"}],"name":"assignMultipleParcels","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ping","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"}],"name":"setLatestToNow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"encodeTokenId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"value","type":"uint256"}],"name":"decodeTokenId","outputs":[{"name":"","type":"int256"},{"name":"","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"ownerOfLand","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"}],"name":"ownerOfLandMany","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"landOf","outputs":[{"name":"","type":"int256[]"},{"name":"","type":"int256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"tokenMetadata","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"landData","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"assetId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"to","type":"address"}],"name":"transferLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"to","type":"address"}],"name":"transferManyLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"estateId","type":"uint256"}],"name":"transferLandToEstate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"estateId","type":"uint256"}],"name":"transferManyLandToEstate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"assetId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"name":"setUpdateManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"registry","type":"address"}],"name":"setEstateRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"beneficiary","type":"address"}],"name":"createEstate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"beneficiary","type":"address"},{"name":"metadata","type":"string"}],"name":"createEstateWithMetadata","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"data","type":"string"}],"name":"updateLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"data","type":"string"}],"name":"updateManyLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]}')},927:function(e,t){},944:function(e,t){},981:function(e,t){},983:function(e,t){}},[[1925,1,2]]]);
2
+ //# sourceMappingURL=main.41591ec4.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["config.ts","modules/land/actions.ts","modules/land/reducer.ts","modules/signature/actions.ts","modules/signature/reducer.ts","modules/authorization/actions.ts","modules/authorization/reducer.ts","reducer.ts","contracts.ts","modules/land/utils.ts","modules/land/sagas.ts","modules/wallet/sagas.ts","modules/server/utils.ts","modules/signature/sagas.ts","modules/authorization/sagas.ts","modules/signature/selectors.ts","components/Error.tsx","components/RenderWalletData/RenderWalletData.tsx","components/IdentityPage/IdentityPage.container.tsx","components/IdentityPage/index.ts","components/IdentityPage/IdentityPage.tsx","modules/land/selectors.ts","modules/authorization/selectors.ts","components/LandInfo/LandInfo.tsx","components/LinkerPage/LinkerPage.container.tsx","components/LinkerPage/index.ts","components/LinkerPage/LinkerPage.tsx","components/Root.tsx","index.tsx","store.ts","sagas.ts"],"names":["config","parseCoords","query","map","c","split","x","y","parseInt","init","searchParams","URLSearchParams","window","location","search","baseParcel","get","parcels","getAll","wearableId","undefined","rootCID","debug","estateRegistry","landRegistry","chainId","ethereum","ChainId","ETHEREUM_MAINNET","ETHEREUM_ROPSTEN","setConfig","isRopsten","isDevelopment","getConfig","key","FETCH_LAND_REQUEST","FETCH_LAND_SUCCESS","FETCH_LAND_FAILURE","fetchLandSuccess","land","action","INITIAL_STATE","data","loading","error","SIGN_CONTENT_REQUEST","SIGN_CONTENT_SUCCESS","SIGN_CONTENT_FAILURE","signContentFailure","CREATE_IDENTITY_REQUEST","CREATE_IDENTITY_SUCCESS","CREATE_IDENTITY_FAILURE","createIdentitySuccess","identity","FETCH_AUTHORIZATIONS_REQUEST","FETCH_AUTHORIZATIONS_SUCCESS","FETCH_AUTHORIZATIONS_FAILURE","fetchAuthorizationsSuccess","authorizations","rootReducer","combineReducers","wallet","transaction","state","type","loadingReducer","payload","signature","authorization","contractInstances","getLandContract","a","getConnectedProvider","provider","address","Contract","LANDRegistry","Web3Provider","getSigner","getEstateContract","estate","EstateRegistry","coordsToString","landSaga","handleFetchLandRequest","handleConnectWalletSuccess","takeEvery","CONNECT_WALLET_SUCCESS","call","decodeLandData","version","name","description","put","message","coords","charAt","CSV","cellDelimiter","ipns","Error","walletSaga","fullWalletSaga","handleWallet","baseWalletSaga","createWalletSaga","CHAIN_ID","all","CHANGE_NETWORK","CHANGE_ACCOUNT","reload","closeServer","ok","fetch","JSON","stringify","signatureSaga","handleSignContentRequest","handleSignContentSuccess","handleCreateIdentityRequest","handleCreateIdentitySuccess","takeLatest","dataToSign","toUtf8Bytes","web3provider","signer","getAddress","addr","send","hexlify","toLowerCase","signedMessage","select","getChainId","responseType","_action","createIdentity","console","log","authorizationSaga","handleFetchAuthorizationsRequest","assetIds","Map","pAuthorizations","parcel","pAuthorization","Promise","resolve","reject","then","assetId","isUpdateAuthorized","set","catch","push","f","parcelAuthorizations","notAllowedAuthorizations","filter","allowedAuthorizations","pEstateAuthorizations","estateAuthorizations","owner","getState","getData","createSelector","isLoading","length","React","memo","children","style","color","RenderWalletData","isConnected","isConnecting","onConnectWallet","scale","seed","tooltip","strong","value","join","primary","onClick","disabled","IdentityPage","connect","getWallet","signed","getSignature","isSigning","isSigningTx","dispatch","enableWalletRequest","ProviderType","INJECTED","onRequestIdentity","props","className","e","preventDefault","getError","every","LandInfo","deployUrl","base","href","target","rel","LinkerPage","getLand","isLandLoading","getLandError","getAuthorizations","isAuthorizationLoading","onSignContent","cid","signContentRequest","networkName","maxWidth","maxHeight","width","src","alt","Root","document","has","ReactDOM","render","store","initConfig","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStorageMiddleware","storageKey","storageMiddleware","loadStorageMiddleware","sagasMiddleware","createSagasMiddleware","transactionMiddleware","createTransactionMiddleware","loggerMiddleware","createLogger","collapsed","predicate","_","enhancer","applyMiddleware","createStore","run","initStore","getElementById"],"mappings":"8VAeIA,E,4GAEJ,SAASC,EAAYC,GACnB,OAAKA,GAC2B,kBAAVA,EAAqB,CAACA,GAASA,GACvCC,KAAI,SAAAC,GAChB,MAAeA,EAAEC,MAAM,KAAvB,mBAAOC,EAAP,KAAUC,EAAV,KACA,MAAO,CAAED,EAAGE,SAASF,EAAG,IAAKC,EAAGC,SAASD,EAAG,QAJ3B,CAAC,CAAED,EAAG,EAAGC,EAAG,IAgC1B,SAASE,KAnBhB,WAAsB,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,IAIIX,EAAQoB,YAAY/L,EAAa6L,GAKvC,OAHAT,EAAgBY,IC3BhB,UAAO,8EACL,OADK,SACChJ,cAAI,CAACN,KAAclB,KAAYiC,KAAiBuB,OADjD,2CD4BPmG,EAAsBR,GAEfA,ED1BUsB,GAAjB,SACE,eAAC,IAAD,UACE,eAAC,GAAD,QAGJ1B,SAAS2B,eAAe,U","file":"static/js/main.41591ec4.chunk.js","sourcesContent":["import { ChainId } from '@dcl/schemas'\n\nimport { Coords } from './modules/land/types'\n\ntype Config = {\n baseParcel: Coords\n parcels: Coords[]\n rootCID: string\n debug: boolean\n estateRegistry?: string\n landRegistry?: string\n chainId: ChainId\n wearableId?: string\n}\n\nlet config: Config | undefined\n\nfunction parseCoords(query: string | string[] | null): Coords[] {\n if (!query) return [{ x: 0, y: 0 }]\n const coords = typeof query === 'string' ? [query] : query\n return coords.map(c => {\n const [x, y] = c.split(',')\n return { x: parseInt(x, 10), y: parseInt(y, 10) }\n })\n}\n\ntype UrlFinder = {\n get: (key: keyof Config) => string | null\n getAll: (key: keyof Config) => string[] | null\n}\n\nfunction setConfig() {\n const searchParams = new URLSearchParams(window.location.search) as UrlFinder\n config = {\n baseParcel: parseCoords(searchParams.get('baseParcel'))[0],\n parcels: parseCoords(searchParams.getAll('parcels')),\n wearableId: searchParams.get('wearableId') || undefined,\n rootCID:\n searchParams.get('rootCID') ||\n 'QmPjpPyibbryTCi75zzcdeuPUBcujtEqj43shwKBAdMojy',\n debug: searchParams.get('debug') === 'true',\n estateRegistry: searchParams.get('estateRegistry') as string,\n landRegistry: searchParams.get('landRegistry') as string,\n chainId:\n (window?.ethereum as any)?.chainId === '0x1'\n ? ChainId.ETHEREUM_MAINNET\n : ChainId.ETHEREUM_ROPSTEN\n }\n}\n\nexport function init() {\n setConfig()\n}\n\nexport function isRopsten() {\n return (window?.ethereum as any)?.chainId !== '0x1'\n}\n\nexport function isDevelopment(): boolean {\n return !!config?.debug\n}\n\nexport function getConfig<T extends keyof Config>(key: T) {\n return (config as Config)[key]\n}\n","import { action } from 'typesafe-actions'\nimport { LANDMeta, Coords } from './types'\n\nexport const FETCH_LAND_REQUEST = '[Request] Fetch LAND'\nexport const FETCH_LAND_SUCCESS = '[Success] Fetch LAND'\nexport const FETCH_LAND_FAILURE = '[Failure] Fetch LAND'\n\nexport const fetchLandRequest = (coords: Coords) =>\n action(FETCH_LAND_REQUEST, coords)\nexport const fetchLandSuccess = (land: LANDMeta) =>\n action(FETCH_LAND_SUCCESS, { land })\nexport const fetchLandFailure = (error: string) =>\n action(FETCH_LAND_FAILURE, { error })\n\nexport type FetchLandRequestAction = ReturnType<typeof fetchLandRequest>\nexport type FetchLandSuccessAction = ReturnType<typeof fetchLandSuccess>\nexport type FetchLandFailureAction = ReturnType<typeof fetchLandFailure>\n","import {\n loadingReducer,\n LoadingState\n} from 'decentraland-dapps/dist/modules/loading/reducer'\n\nimport {\n FetchLandRequestAction,\n FetchLandSuccessAction,\n FetchLandFailureAction,\n FETCH_LAND_REQUEST,\n FETCH_LAND_FAILURE,\n FETCH_LAND_SUCCESS\n} from './actions'\n\nexport type LandState = {\n data: any\n loading: LoadingState\n error: string | null\n}\n\nconst INITIAL_STATE: LandState = {\n data: {},\n loading: [],\n error: null\n}\n\nexport type LandReducerAction =\n | FetchLandRequestAction\n | FetchLandSuccessAction\n | FetchLandFailureAction\n\nexport const landReducer = (\n state = INITIAL_STATE,\n action: LandReducerAction\n): LandState => {\n switch (action.type) {\n case FETCH_LAND_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case FETCH_LAND_SUCCESS:\n return {\n loading: loadingReducer(state.loading, action),\n data: action.payload.land,\n error: null\n }\n case FETCH_LAND_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n default: {\n return state\n }\n }\n}\n","import { AuthIdentity } from 'dcl-crypto'\nimport { action } from 'typesafe-actions'\n\nexport const SIGN_CONTENT_REQUEST = '[Request] Sign Content'\nexport const SIGN_CONTENT_SUCCESS = '[Success] Sign Content'\nexport const SIGN_CONTENT_FAILURE = '[Failure] Sign Content'\n\nexport const signContentRequest = (cid: string) =>\n action(SIGN_CONTENT_REQUEST, cid)\nexport const signContentSuccess = (signature: string) =>\n action(SIGN_CONTENT_SUCCESS, { signature })\nexport const signContentFailure = (error: string) =>\n action(SIGN_CONTENT_FAILURE, { error })\n\nexport type SignContentRequestAction = ReturnType<typeof signContentRequest>\nexport type SignContentSuccessAction = ReturnType<typeof signContentSuccess>\nexport type SignContentFailureAction = ReturnType<typeof signContentFailure>\n\nexport const CREATE_IDENTITY_REQUEST = '[Request] Create Identity'\nexport const CREATE_IDENTITY_SUCCESS = '[Success] Create Identity'\nexport const CREATE_IDENTITY_FAILURE = '[Failure] Create Identity'\n\nexport const createIdentityRequest = () => action(CREATE_IDENTITY_REQUEST, {})\nexport const createIdentitySuccess = (identity: AuthIdentity) =>\n action(CREATE_IDENTITY_SUCCESS, { identity })\nexport const createIdentityFailure = (error: string) =>\n action(CREATE_IDENTITY_FAILURE, { error })\n\nexport type CreateIdentityRequestAction = ReturnType<\n typeof createIdentityRequest\n>\nexport type CreateIdentitySuccessAction = ReturnType<\n typeof createIdentitySuccess\n>\nexport type CreateIdentityFailureAction = ReturnType<\n typeof createIdentityFailure\n>\n","import { AuthIdentity } from 'dcl-crypto'\nimport {\n loadingReducer,\n LoadingState\n} from 'decentraland-dapps/dist/modules/loading/reducer'\n\nimport {\n SignContentRequestAction,\n SignContentSuccessAction,\n SignContentFailureAction,\n SIGN_CONTENT_REQUEST,\n SIGN_CONTENT_SUCCESS,\n SIGN_CONTENT_FAILURE,\n CreateIdentityRequestAction,\n CreateIdentitySuccessAction,\n CreateIdentityFailureAction,\n CREATE_IDENTITY_REQUEST,\n CREATE_IDENTITY_SUCCESS,\n CREATE_IDENTITY_FAILURE\n} from './actions'\n\nexport type SignatureState = {\n data: any\n identity: AuthIdentity | null\n loading: LoadingState\n error: string | null\n}\n\nconst INITIAL_STATE: SignatureState = {\n data: '',\n loading: [],\n identity: null,\n error: null\n}\n\nexport type SignatureReducerAction =\n | SignContentRequestAction\n | SignContentSuccessAction\n | SignContentFailureAction\n | CreateIdentityRequestAction\n | CreateIdentitySuccessAction\n | CreateIdentityFailureAction\n\nexport const signatureReducer = (\n state = INITIAL_STATE,\n action: SignatureReducerAction\n): SignatureState => {\n switch (action.type) {\n case SIGN_CONTENT_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case SIGN_CONTENT_SUCCESS:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n data: action.payload.signature,\n error: null\n }\n case SIGN_CONTENT_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n case CREATE_IDENTITY_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case CREATE_IDENTITY_SUCCESS:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n identity: action.payload.identity,\n error: null\n }\n case CREATE_IDENTITY_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n default: {\n return state\n }\n }\n}\n","import { action } from 'typesafe-actions'\nimport { Authorization } from './types'\n\nexport const FETCH_AUTHORIZATIONS_REQUEST =\n '[Request] Fetch LAND Authorizations'\nexport const FETCH_AUTHORIZATIONS_SUCCESS =\n '[Success] Fetch LAND Authorizations'\nexport const FETCH_AUTHORIZATIONS_FAILURE =\n '[Failure] Fetch LAND Authorizations'\n\nexport const fetchAuthorizationsRequest = (owner: string) =>\n action(FETCH_AUTHORIZATIONS_REQUEST, { owner })\n\nexport const fetchAuthorizationsSuccess = (authorizations: Authorization[]) =>\n action(FETCH_AUTHORIZATIONS_SUCCESS, { authorizations })\n\nexport const fetchAuthorizationsFailure = (error: string) =>\n action(FETCH_AUTHORIZATIONS_FAILURE, { error })\n\nexport type FetchAuthorizationsRequestAction = ReturnType<\n typeof fetchAuthorizationsRequest\n>\nexport type FetchAuthorizationsSuccessAction = ReturnType<\n typeof fetchAuthorizationsSuccess\n>\nexport type FetchAuthorizationsFailureAction = ReturnType<\n typeof fetchAuthorizationsFailure\n>\n","import {\n loadingReducer,\n LoadingState\n} from 'decentraland-dapps/dist/modules/loading/reducer'\n\nimport {\n FetchAuthorizationsRequestAction,\n FetchAuthorizationsSuccessAction,\n FetchAuthorizationsFailureAction,\n FETCH_AUTHORIZATIONS_REQUEST,\n FETCH_AUTHORIZATIONS_SUCCESS,\n FETCH_AUTHORIZATIONS_FAILURE\n} from './actions'\n\nexport type AuthorizationState = {\n data: any\n loading: LoadingState\n error: string | null\n}\n\nconst INITIAL_STATE: AuthorizationState = {\n data: [],\n loading: [],\n error: null\n}\n\nexport type AuthorizationReducerAction =\n | FetchAuthorizationsRequestAction\n | FetchAuthorizationsSuccessAction\n | FetchAuthorizationsFailureAction\n\nexport const authorizationReducer = (\n state = INITIAL_STATE,\n action: AuthorizationReducerAction\n): AuthorizationState => {\n switch (action.type) {\n case FETCH_AUTHORIZATIONS_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case FETCH_AUTHORIZATIONS_SUCCESS:\n return {\n loading: loadingReducer(state.loading, action),\n data: action.payload.authorizations,\n error: null\n }\n case FETCH_AUTHORIZATIONS_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n default: {\n return state\n }\n }\n}\n","import { combineReducers } from 'redux'\nimport { walletReducer as wallet } from 'decentraland-dapps/dist/modules/wallet/reducer'\nimport { transactionReducer as transaction } from 'decentraland-dapps/dist/modules/transaction/reducer'\n\nimport { landReducer as land } from './modules/land/reducer'\nimport { signatureReducer as signature } from './modules/signature/reducer'\nimport { authorizationReducer as authorization } from './modules/authorization/reducer'\nimport { RootState } from './types'\n\nexport const rootReducer = combineReducers<RootState>({\n wallet,\n transaction,\n land,\n signature,\n authorization\n})\n","import { Contract } from '@ethersproject/contracts'\nimport { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth'\nimport { Web3Provider } from '@ethersproject/providers'\n\nimport * as EstateRegistry from './abis/EstateRegistry.json'\nimport * as LANDRegistry from './abis/LANDRegistry.json'\nimport { getConfig, isRopsten } from './config'\n\nconst contractInstances: {\n land?: Contract\n estate?: Contract\n} = {}\n\nexport async function getLandContract() {\n if (!contractInstances.land) {\n const provider = await getConnectedProvider()\n if (provider) {\n const landRegistry = getConfig('landRegistry')\n const address =\n landRegistry ||\n (isRopsten()\n ? '0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b'\n : '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d')\n contractInstances.land = new Contract(\n address,\n LANDRegistry.abi,\n new Web3Provider(provider).getSigner()\n )\n }\n }\n\n return contractInstances.land\n}\n\nexport async function getEstateContract() {\n if (!contractInstances.estate) {\n const provider = await getConnectedProvider()\n if (provider) {\n const estateRegistry = getConfig('landRegistry')\n const address =\n estateRegistry ||\n (isRopsten()\n ? '0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95'\n : '0x959e104e1a4db6317fa58f8295f586e1a978c297')\n contractInstances.estate = new Contract(\n address,\n EstateRegistry.abi,\n new Web3Provider(provider).getSigner()\n )\n }\n }\n\n return contractInstances.estate\n}\n","import { LANDMeta, Coords } from './types'\n\nexport function getEmptyLandData(): LANDMeta {\n return {\n version: 0,\n name: '',\n description: ''\n }\n}\n\nexport function coordsToString({ x, y }: Coords): string {\n return `${x},${y}`\n}\n","import { call, put, takeEvery } from 'redux-saga/effects'\nimport { CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport * as CSV from 'comma-separated-values'\n\nimport { getConfig } from '../../config'\nimport { getLandContract } from '../../contracts'\nimport {\n FETCH_LAND_REQUEST,\n FetchLandRequestAction,\n fetchLandSuccess,\n fetchLandFailure,\n fetchLandRequest\n} from './actions'\nimport { getEmptyLandData } from './utils'\nimport { Contract } from '@ethersproject/contracts'\nimport { LANDMeta } from './types'\n\nexport function* landSaga() {\n yield takeEvery(FETCH_LAND_REQUEST, handleFetchLandRequest)\n yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)\n}\n\nfunction* handleFetchLandRequest(action: FetchLandRequestAction) {\n const LANDRegistry: Contract = yield call(() => getLandContract())\n try {\n const { x, y } = action.payload\n const data: string = yield call(() => LANDRegistry['landData'](x, y))\n const land: LANDMeta = data\n ? yield call(() => decodeLandData(data))\n : getEmptyLandData()\n yield put(fetchLandSuccess(land))\n } catch (error) {\n yield put(fetchLandFailure((error as Error).message))\n }\n}\n\nfunction* handleConnectWalletSuccess() {\n yield put(fetchLandRequest(getConfig('baseParcel')))\n}\n\nfunction decodeLandData(data = '') {\n const version = data.charAt(0)\n switch (version) {\n case '0': {\n const [version, name, description, ipns] = CSV.parse(data, {\n cellDelimiter: ','\n })[0]\n\n return {\n version,\n // when a value is blank, csv.parse returns 0, so we fallback to empty string\n // to support stuff like `0,,,ipns:link`\n name: name || '',\n description: description || '',\n ipns: ipns || ''\n }\n }\n default:\n throw new Error(\n `Unknown version when trying to decode land data: \"${data}\"`\n )\n }\n}\n","import { takeEvery, all, call } from 'redux-saga/effects'\nimport { createWalletSaga } from 'decentraland-dapps/dist/modules/wallet/sagas'\nimport {\n CHANGE_NETWORK,\n CHANGE_ACCOUNT\n} from 'decentraland-dapps/dist/modules/wallet/actions'\n\nimport { getConfig } from '../../config'\n\nexport function* walletSaga() {\n const baseWalletSaga = createWalletSaga({\n CHAIN_ID: getConfig('chainId')\n })\n yield all([baseWalletSaga(), fullWalletSaga()])\n}\n\nfunction* fullWalletSaga() {\n yield takeEvery(CHANGE_NETWORK, handleWallet)\n yield takeEvery(CHANGE_ACCOUNT, handleWallet)\n}\n\nfunction* handleWallet() {\n yield call(() => window.location.reload())\n}\n","import { ChainId } from '@dcl/schemas'\nimport { AuthIdentity } from 'dcl-crypto'\n\nexport type LinkerResponseScenenDeploy = {\n responseType: 'scene-deploy'\n payload: {\n address: string\n signature: string\n chainId: ChainId\n }\n}\n\nexport type LinkerResponseIdentity = {\n responseType: 'identity'\n payload: {\n address: string\n chainId: ChainId\n identity: AuthIdentity\n }\n}\n\nexport type LinkerResponse = LinkerResponseScenenDeploy | LinkerResponseIdentity\n\nexport async function closeServer(\n ok: boolean,\n message: LinkerResponse\n): Promise<void> {\n await fetch(`/api/close?ok=${ok}&reason=${JSON.stringify(message)}`)\n}\n","import { call, put, takeLatest, takeEvery, select } from 'redux-saga/effects'\nimport { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth'\nimport {\n getAddress,\n getChainId\n} from 'decentraland-dapps/dist/modules/wallet/selectors'\nimport { Web3Provider } from '@ethersproject/providers'\nimport { toUtf8Bytes } from '@ethersproject/strings'\nimport { ChainId } from '@dcl/schemas'\nimport { hexlify } from '@ethersproject/bytes'\n\nimport { closeServer } from '../server/utils'\nimport {\n SIGN_CONTENT_REQUEST,\n SIGN_CONTENT_SUCCESS,\n SignContentRequestAction,\n signContentSuccess,\n signContentFailure,\n SignContentSuccessAction,\n CREATE_IDENTITY_REQUEST,\n createIdentitySuccess,\n createIdentityFailure,\n CREATE_IDENTITY_SUCCESS,\n CreateIdentitySuccessAction\n} from './actions'\nimport { Provider } from 'decentraland-connect/dist'\nimport { AuthIdentity } from 'dcl-crypto'\nimport { createIdentity } from '@dcl/builder-client'\n\nexport function* signatureSaga() {\n yield takeLatest(SIGN_CONTENT_REQUEST, handleSignContentRequest)\n yield takeEvery(SIGN_CONTENT_SUCCESS, handleSignContentSuccess)\n\n yield takeLatest(CREATE_IDENTITY_REQUEST, handleCreateIdentityRequest)\n yield takeLatest(CREATE_IDENTITY_SUCCESS, handleCreateIdentitySuccess)\n}\n\nfunction* handleSignContentRequest(action: SignContentRequestAction) {\n try {\n const dataToSign = toUtf8Bytes(action.payload)\n\n const provider: Provider = yield call(() => getConnectedProvider())\n const web3provider = new Web3Provider(provider)\n const signer = web3provider.getSigner()\n\n const addr: string = yield call(() => signer.getAddress())\n\n const signedMessage: string = yield call(() =>\n provider.send('personal_sign', [hexlify(dataToSign), addr.toLowerCase()])\n )\n yield put(signContentSuccess(signedMessage))\n } catch (error) {\n yield put(signContentFailure((error as Error).message))\n }\n}\n\nfunction* handleSignContentSuccess(action: SignContentSuccessAction) {\n const address: string = yield select(getAddress)\n const chainId: ChainId = yield select(getChainId)\n const { signature } = action.payload\n\n try {\n yield call(() => {\n // tslint:disable-next-line: no-floating-promises\n closeServer(true, {\n responseType: 'scene-deploy',\n payload: { signature, address, chainId }\n })\n })\n } catch (error) {\n yield put(signContentFailure((error as Error).message))\n }\n}\n\nfunction* handleCreateIdentityRequest(_action: SignContentRequestAction) {\n try {\n const provider: Provider = yield call(() => getConnectedProvider())\n const web3provider = new Web3Provider(provider)\n const signer = web3provider.getSigner()\n const identity: AuthIdentity = yield call(() => createIdentity(signer, 1000))\n yield put(createIdentitySuccess(identity))\n } catch (error) {\n console.log({ error })\n yield put(createIdentityFailure((error as Error).message))\n }\n}\n\nfunction* handleCreateIdentitySuccess(action: CreateIdentitySuccessAction) {\n const { identity } = action.payload\n const address: string = yield select(getAddress)\n const chainId: ChainId = yield select(getChainId)\n\n try {\n yield call(() => {\n // tslint:disable-next-line: no-floating-promises\n closeServer(true, {\n responseType: 'identity',\n payload: { identity, address, chainId }\n })\n })\n } catch (error) {\n yield put(signContentFailure((error as Error).message))\n }\n}\n","import { call, put, takeEvery, select } from 'redux-saga/effects'\nimport { CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors'\n\nimport { getLandContract, getEstateContract } from '../../contracts'\nimport { getConfig } from '../../config'\nimport { coordsToString } from '../land/utils'\nimport {\n FETCH_AUTHORIZATIONS_REQUEST,\n fetchAuthorizationsRequest,\n fetchAuthorizationsFailure,\n fetchAuthorizationsSuccess\n} from './actions'\nimport { Authorization } from './types'\nimport { Contract } from '@ethersproject/contracts'\n\nexport function* authorizationSaga() {\n yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)\n yield takeEvery(\n FETCH_AUTHORIZATIONS_REQUEST,\n handleFetchAuthorizationsRequest\n )\n}\n\nfunction* handleFetchAuthorizationsRequest() {\n const LANDRegistry: Contract = yield call(() => getLandContract())\n const EstateRegistry: Contract = yield call(() => getEstateContract())\n\n try {\n const address: string = yield select(getAddress)\n const assetIds = new Map<string, string>()\n\n const pAuthorizations: Promise<unknown>[] = []\n for (const parcel of getConfig('parcels')) {\n const { x, y } = parcel\n const pAuthorization = new Promise((resolve, reject) => {\n LANDRegistry['encodeTokenId'](x, y)\n .then((assetId: any) => {\n LANDRegistry['isUpdateAuthorized'](address, assetId)\n .then((isUpdateAuthorized: any) => {\n assetIds.set(coordsToString(parcel), assetId)\n resolve({ x, y, isUpdateAuthorized })\n })\n .catch(reject)\n })\n .catch(reject)\n })\n pAuthorizations.push(pAuthorization)\n }\n\n const parcelAuthorizations: Authorization[] = yield call(() =>\n Promise.all(pAuthorizations)\n )\n\n // If not authorized check permissions on estate\n const notAllowedAuthorizations = parcelAuthorizations.filter(\n a => !a.isUpdateAuthorized\n )\n const allowedAuthorizations = parcelAuthorizations.filter(\n a => a.isUpdateAuthorized\n )\n\n const pEstateAuthorizations: unknown[] = []\n for (const a of notAllowedAuthorizations) {\n const assetId = assetIds.get(coordsToString(a))\n const pAuthorization = new Promise((resolve, reject) => {\n EstateRegistry['getLandEstateId'](assetId)\n .then((estate: any) => {\n if (estate && estate > 0) {\n return EstateRegistry['isUpdateAuthorized'](address, estate).then(\n (isUpdateAuthorized: any) => {\n resolve({ ...a, isUpdateAuthorized })\n }\n )\n } else {\n return resolve(a) // If no estate leave authorization in false\n }\n })\n .catch(reject)\n })\n pEstateAuthorizations.push(pAuthorization)\n }\n\n const estateAuthorizations: Authorization[] = yield call(() =>\n Promise.all(pEstateAuthorizations)\n )\n\n const authorizations = [...allowedAuthorizations, ...estateAuthorizations]\n yield put(fetchAuthorizationsSuccess(authorizations))\n } catch (error) {\n yield put(fetchAuthorizationsFailure((error as Error).message))\n }\n}\n\nfunction* handleConnectWalletSuccess(): any {\n const address = yield call(() => getAddress)\n yield put(fetchAuthorizationsRequest(address))\n}\n","import { createSelector } from 'reselect'\nimport { RootState } from '../../types'\n\nexport const getState = (state: RootState) => state.signature\nexport const getData = createSelector(getState, state => state.data)\nexport const isLoading = createSelector(\n getState,\n state => state.loading.length > 0\n)\nexport const getError = createSelector(getState, state => state.error)\n","import React from 'react'\n\nexport default React.memo(({ children }: { children: string }) => (\n <p style={{ color: 'var(--primary)' }}> Error: {children}</p>\n))\n","import { Props } from './types'\nimport { Blockie, Address, Button } from 'decentraland-ui'\nimport { coordsToString } from '../../modules/land/utils'\nimport Error from '../Error'\n\nexport default function RenderWalletData({\n isConnected,\n isConnecting,\n wallet,\n authorizations,\n isUpdateAuthorized,\n onConnectWallet\n}: Props) {\n function getFormattedUnauthorized() {\n return (authorizations || [])\n .filter(a => !a.isUpdateAuthorized)\n .map(a => `\"${coordsToString(a)}\"`)\n .join(', ')\n }\n\n if (isConnected && wallet.address) {\n return (\n <>\n <p>\n Using address: &nbsp;\n <Blockie scale={3} seed={wallet.address}>\n <Address tooltip strong value={wallet.address} />\n </Blockie>\n </p>\n {authorizations?.length && !isUpdateAuthorized ? (\n <Error>\n {`You don't have permissions to update The following LANDs that are part of the scene: ${getFormattedUnauthorized()}`}\n </Error>\n ) : null}\n </>\n )\n }\n\n return (\n <>\n {isConnecting ? null : <p>Could not find any wallet</p>}\n <p>\n <Button\n primary\n onClick={onConnectWallet}\n loading={isConnecting}\n disabled={isConnecting}\n >\n Reconnect&nbsp;\n </Button>\n </p>\n </>\n )\n}\n","import { AnyAction, Dispatch } from 'redux'\nimport { connect } from 'react-redux'\nimport { ProviderType } from 'decentraland-connect'\nimport { enableWalletRequest } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport {\n getData as getWallet,\n isConnected,\n isConnecting\n} from 'decentraland-dapps/dist/modules/wallet/selectors'\n\nimport {\n getData as getSignature,\n isLoading as isSigningTx\n} from '../../modules/signature/selectors'\n\nimport { createIdentityRequest } from '../../modules/signature/actions'\nimport { RootState } from '../../types'\nimport { MapStateProps, MapDispatchProps } from './types'\n\nimport IdentityPage from './IdentityPage'\n\nconst mapState = (state: RootState): MapStateProps => {\n return {\n wallet: getWallet(state)!,\n isConnected: isConnected(state),\n isConnecting: isConnecting(state),\n signed: !!getSignature(state),\n isSigning: isSigningTx(state)\n }\n}\n\nconst mapDispatch = (dispatch: Dispatch<AnyAction>): MapDispatchProps => ({\n onConnectWallet: () => dispatch(enableWalletRequest(ProviderType.INJECTED)),\n onRequestIdentity: () => dispatch(createIdentityRequest())\n})\n\nexport default connect(mapState, mapDispatch)(IdentityPage)\n","import IdentityPage from './IdentityPage.container'\nexport default IdentityPage\n","import { SyntheticEvent } from 'react'\nimport './style.css'\nimport { Header, Button, Navbar } from 'decentraland-ui'\nimport { Props } from './types'\nimport RenderWalletData from '../RenderWalletData/RenderWalletData'\nimport { isRopsten } from '../../config'\n\nexport default function IdentityPage(props: Props) {\n const {\n isConnected,\n wallet,\n isConnecting,\n onConnectWallet,\n isSigning,\n onRequestIdentity\n } = props\n\n const handleSignature = (e: SyntheticEvent) => {\n e.preventDefault()\n onRequestIdentity()\n }\n\n return (\n <div className=\"LinkScenePage\">\n {isRopsten() && <div className=\"warning\">Using Ropsten test network</div>}\n <Navbar />\n <Header>Create an identity to sign deployments </Header>\n <RenderWalletData\n isUpdateAuthorized={true}\n isConnected={isConnected}\n isConnecting={isConnecting}\n wallet={wallet}\n onConnectWallet={onConnectWallet}\n />\n <form>\n <div>\n <Button\n primary\n onClick={handleSignature}\n disabled={!isConnected}\n loading={isSigning}\n >\n Sign ephemeral wallet\n </Button>\n </div>\n </form>\n </div>\n )\n}\n","import { createSelector } from 'reselect'\n\nimport { RootState } from '../../types'\n\nexport const getState = (state: RootState) => state.land\n\nexport const getData = createSelector(getState, state => state.data)\n\nexport const isLoading = createSelector(\n getState,\n state => state.loading.length > 0\n)\n\nexport const getError = createSelector(getState, state => state.error)\n","import { createSelector } from 'reselect'\n\nimport { RootState } from '../../types'\nimport { Authorization } from './types'\n\nexport const getState = (state: RootState) => state.authorization\n\nexport const getData = createSelector(getState, state => state.data)\n\nexport const isLoading = createSelector(\n getState,\n state => state.loading.length > 0\n)\n\nexport const getError = createSelector(getState, state => state.error)\n\nexport const isUpdateAuthorized = createSelector(getData, authorizations => {\n if (!authorizations?.length) {\n return\n }\n\n return authorizations.every((a: Authorization) => a.isUpdateAuthorized)\n})\n","import { getConfig } from '../../config'\nimport { Props } from './types'\n\nexport default function LandInfo({ deployUrl, base }: Props) {\n const name = base.name ?? 'LAND without name'\n\n const { x, y } = getConfig('baseParcel')\n\n return (\n <p>\n Updating <b>{name}</b>{' '}\n <a href={deployUrl} target=\"_blank\" rel=\"noreferrer\">\n at coordinates {x}, {y}\n </a>\n </p>\n )\n}\n","import { AnyAction, Dispatch } from 'redux'\nimport { connect } from 'react-redux'\nimport { ProviderType } from 'decentraland-connect'\nimport { enableWalletRequest } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport {\n getData as getWallet,\n isConnected,\n isConnecting\n} from 'decentraland-dapps/dist/modules/wallet/selectors'\n\nimport {\n isLoading as isLandLoading,\n getData as getLand,\n getError as getLandError\n} from '../../modules/land/selectors'\nimport {\n getData as getSignature,\n isLoading as isSigningTx\n} from '../../modules/signature/selectors'\nimport {\n getData as getAuthorizations,\n isUpdateAuthorized,\n isLoading as isAuthorizationLoading\n} from '../../modules/authorization/selectors'\nimport { signContentRequest } from '../../modules/signature/actions'\nimport { RootState } from '../../types'\nimport { MapStateProps, MapDispatchProps } from './types'\n\nimport LinkerPage from './LinkerPage'\n\nconst mapState = (state: RootState): MapStateProps => {\n return {\n base: getLand(state),\n wallet: getWallet(state)!,\n isLandLoading: isLandLoading(state),\n isConnected: isConnected(state),\n isConnecting: isConnecting(state),\n error: getLandError(state)!,\n signed: !!getSignature(state),\n isUpdateAuthorized: isUpdateAuthorized(state),\n authorizations: getAuthorizations(state),\n isAuthorizationLoading: isAuthorizationLoading(state),\n isSigning: isSigningTx(state)\n }\n}\n\nconst mapDispatch = (dispatch: Dispatch<AnyAction>): MapDispatchProps => ({\n onConnectWallet: () => dispatch(enableWalletRequest(ProviderType.INJECTED)),\n onSignContent: (cid: string) => dispatch(signContentRequest(cid))\n})\n\nexport default connect(mapState, mapDispatch)(LinkerPage)\n","import LinkerPage from './LinkerPage.container'\nexport default LinkerPage\n","import { SyntheticEvent } from 'react'\nimport './style.css'\nimport { Header, Button, Navbar } from 'decentraland-ui'\nimport { ChainId } from '@dcl/schemas'\nimport { getConfig, isDevelopment } from '../../config'\nimport Error from '../Error'\nimport { Props } from './types'\nimport LandInfo from '../LandInfo/LandInfo'\nimport RenderWalletData from '../RenderWalletData/RenderWalletData'\n\nexport default function LinkScenePage(props: Props) {\n const {\n isConnected,\n wallet,\n authorizations,\n isUpdateAuthorized,\n isConnecting,\n onConnectWallet,\n isSigning,\n base,\n error,\n isAuthorizationLoading,\n signed\n } = props\n\n const handleSignature = (e: SyntheticEvent) => {\n e.preventDefault()\n const { onSignContent } = props\n onSignContent(getConfig('rootCID'))\n }\n\n const { x, y } = getConfig('baseParcel')\n const rootCID = getConfig('rootCID')\n const isRopsten = wallet?.chainId === ChainId.ETHEREUM_ROPSTEN\n const networkName = isRopsten ? 'zone' : 'org'\n const deployUrl = `https://play.decentraland.${networkName}/?position=${x},${y}`\n\n return (\n <div className=\"LinkScenePage\">\n {isRopsten && <div className=\"warning\">Using Ropsten test network</div>}\n <Navbar />\n <Header>Update LAND data</Header>\n <RenderWalletData\n authorizations={authorizations}\n isUpdateAuthorized={isUpdateAuthorized}\n isConnected={isConnected}\n isConnecting={isConnecting}\n wallet={wallet}\n onConnectWallet={onConnectWallet}\n />\n <div>\n <img\n style={{ maxWidth: '100%', maxHeight: '100%', width: '35%' }}\n className=\"map\"\n src={`https://api.decentraland.${networkName}/v1/parcels/${x}/${y}/map.png`}\n alt={`Base parcel ${x},${y}`}\n />\n </div>\n <LandInfo deployUrl={deployUrl} base={base} />\n <p>\n Project CID: <b>{rootCID}</b>\n </p>\n {isConnected && signed && (\n <p>\n Content was succesfully signed and it's being uploaded{' '}\n <a href={deployUrl} target=\"_blank\" rel=\"noreferrer\">\n here\n </a>\n . You can close this page and check the CLI for more info.\n </p>\n )}\n <form>\n <div>\n <Button\n primary\n onClick={handleSignature}\n disabled={\n !isConnected ||\n !!error ||\n isAuthorizationLoading ||\n !isUpdateAuthorized\n }\n loading={isSigning}\n >\n Sign and Deploy\n </Button>\n </div>\n </form>\n {error ? (\n isDevelopment() ? (\n <Error>{error}</Error>\n ) : (\n <Error>There was an unexpected error.</Error>\n )\n ) : null}\n </div>\n )\n}\n","import IdentityPage from './IdentityPage'\nimport LinkerPage from './LinkerPage'\n\n// TODO: implement a router\nconst Root = (props: any) => {\n const qs = new URLSearchParams(document.location.search)\n\n if (qs.has('wearableId')) {\n return <IdentityPage {...props} />\n }\n\n return <LinkerPage {...props} />\n}\n\nexport default Root\n","import ReactDOM from 'react-dom'\nimport WalletProvider from 'decentraland-dapps/dist/providers/WalletProvider'\nimport { Provider } from 'react-redux'\n\nimport { initStore } from './store'\n\nimport 'decentraland-ui/lib/styles.css'\nimport 'decentraland-ui/lib/dark-theme.css'\nimport Root from './components/Root'\n\n// tslint:disable-next-line: no-floating-promises\nReactDOM.render(\n <Provider store={initStore()}>\n <WalletProvider>\n <Root />\n </WalletProvider>\n </Provider>,\n document.getElementById('root')\n)\n","import { applyMiddleware, compose, createStore } from 'redux'\nimport createSagasMiddleware from 'redux-saga'\nimport { createLogger } from 'redux-logger'\nimport { createTransactionMiddleware } from 'decentraland-dapps/dist/modules/transaction/middleware'\nimport { createStorageMiddleware } from 'decentraland-dapps/dist/modules/storage/middleware'\n\nimport { init as initConfig } from './config'\nimport { rootReducer } from './reducer'\nimport { rootSaga } from './sagas'\n\nexport function initStore() {\n initConfig()\n const composeEnhancers =\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose\n\n const { storageMiddleware, loadStorageMiddleware } = createStorageMiddleware({\n storageKey: 'decentraland-linker'\n })\n const sagasMiddleware = createSagasMiddleware()\n const transactionMiddleware = createTransactionMiddleware()\n const loggerMiddleware = createLogger({\n collapsed: () => true,\n predicate: (_, _action) => false // isDevelopment() || action.type.includes('Failure')\n })\n\n const middleware = applyMiddleware(\n sagasMiddleware,\n loggerMiddleware,\n storageMiddleware,\n transactionMiddleware\n )\n\n const enhancer = composeEnhancers(middleware)\n const store = createStore(rootReducer, enhancer)\n\n sagasMiddleware.run(rootSaga())\n loadStorageMiddleware(store)\n\n return store\n}\n","import { all } from 'redux-saga/effects'\n\nimport { landSaga } from './modules/land/sagas'\nimport { walletSaga } from './modules/wallet/sagas'\nimport { signatureSaga } from './modules/signature/sagas'\nimport { authorizationSaga } from './modules/authorization/sagas'\n\nexport function rootSaga() {\n return function*() {\n yield all([walletSaga(), landSaga(), signatureSaga(), authorizationSaga()])\n }\n}\n"],"sourceRoot":""}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ children }: {
3
+ children: string;
4
+ }) => JSX.Element>;
5
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import IdentityPage from './IdentityPage';
2
+ declare const _default: import("react-redux").ConnectedComponent<typeof IdentityPage, import("react-redux").Omit<import("./types").Props, "wallet" | "isConnected" | "isConnecting" | "signed" | "isSigning" | "onConnectWallet" | "onRequestIdentity">>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ import { Props } from './types';
4
+ export default function IdentityPage(props: Props): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import IdentityPage from './IdentityPage.container';
2
+ export default IdentityPage;
@@ -0,0 +1,16 @@
1
+ import { EnableWalletRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions';
2
+ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types';
3
+ import { Transaction } from 'decentraland-dapps/dist/modules/transaction/types';
4
+ import { CreateIdentityRequestAction } from '../../modules/signature/actions';
5
+ export declare type Props = {
6
+ wallet: Partial<Wallet>;
7
+ transaction?: Transaction;
8
+ isConnected: boolean;
9
+ isConnecting: boolean;
10
+ isSigning: boolean;
11
+ signed: boolean;
12
+ onConnectWallet: () => EnableWalletRequestAction;
13
+ onRequestIdentity: () => CreateIdentityRequestAction;
14
+ };
15
+ export declare type MapStateProps = Pick<Props, 'wallet' | 'isConnected' | 'isConnecting' | 'signed' | 'isSigning'>;
16
+ export declare type MapDispatchProps = Pick<Props, 'onConnectWallet' | 'onRequestIdentity'>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { Props } from './types';
3
+ export default function LandInfo({ deployUrl, base }: Props): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { LANDMeta } from '../../modules/land/types';
2
+ export declare type Props = {
3
+ base: LANDMeta;
4
+ deployUrl: string;
5
+ };
@@ -0,0 +1,3 @@
1
+ import LinkerPage from './LinkerPage';
2
+ declare const _default: import("react-redux").ConnectedComponent<typeof LinkerPage, import("react-redux").Omit<import("./types").Props, "isUpdateAuthorized" | "wallet" | "isConnected" | "isConnecting" | "signed" | "isSigning" | "onConnectWallet" | "base" | "authorizations" | "isLandLoading" | "error" | "isAuthorizationLoading" | "onSignContent">>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './style.css';
3
+ import { Props } from './types';
4
+ export default function LinkScenePage(props: Props): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import LinkerPage from './LinkerPage.container';
2
+ export default LinkerPage;
@@ -0,0 +1,25 @@
1
+ import { EnableWalletRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions';
2
+ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types';
3
+ import { Transaction } from 'decentraland-dapps/dist/modules/transaction/types';
4
+ import { LANDMeta } from '../../modules/land/types';
5
+ import { SignContentRequestAction } from '../../modules/signature/actions';
6
+ import { Authorization } from '../../modules/authorization/types';
7
+ export declare type Props = {
8
+ sceneOwner?: string;
9
+ base: LANDMeta;
10
+ wallet: Partial<Wallet>;
11
+ transaction?: Transaction;
12
+ isLandLoading: boolean;
13
+ isConnected: boolean;
14
+ isConnecting: boolean;
15
+ isSigning: boolean;
16
+ error: string;
17
+ signed: boolean;
18
+ isUpdateAuthorized: boolean;
19
+ authorizations: Authorization[];
20
+ isAuthorizationLoading: boolean;
21
+ onConnectWallet: () => EnableWalletRequestAction;
22
+ onSignContent: (cid: string) => SignContentRequestAction;
23
+ };
24
+ export declare type MapStateProps = Pick<Props, 'base' | 'wallet' | 'isLandLoading' | 'isConnected' | 'isConnecting' | 'error' | 'signed' | 'isUpdateAuthorized' | 'authorizations' | 'isAuthorizationLoading' | 'isSigning'>;
25
+ export declare type MapDispatchProps = Pick<Props, 'onConnectWallet' | 'onSignContent'>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { Props } from './types';
3
+ export default function RenderWalletData({ isConnected, isConnecting, wallet, authorizations, isUpdateAuthorized, onConnectWallet }: Props): JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types';
2
+ import { Authorization } from '../../modules/authorization/types';
3
+ import { EnableWalletRequestAction } from 'decentraland-dapps/dist/modules/wallet/actions';
4
+ export declare type Props = {
5
+ wallet: Partial<Wallet>;
6
+ isConnecting: boolean;
7
+ isConnected: boolean;
8
+ isUpdateAuthorized: boolean;
9
+ authorizations?: Authorization[];
10
+ onConnectWallet: () => EnableWalletRequestAction;
11
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Root: (props: any) => JSX.Element;
3
+ export default Root;
@@ -0,0 +1,17 @@
1
+ import { ChainId } from '@dcl/schemas';
2
+ import { Coords } from './modules/land/types';
3
+ declare type Config = {
4
+ baseParcel: Coords;
5
+ parcels: Coords[];
6
+ rootCID: string;
7
+ debug: boolean;
8
+ estateRegistry?: string;
9
+ landRegistry?: string;
10
+ chainId: ChainId;
11
+ wearableId?: string;
12
+ };
13
+ export declare function init(): void;
14
+ export declare function isRopsten(): boolean;
15
+ export declare function isDevelopment(): boolean;
16
+ export declare function getConfig<T extends keyof Config>(key: T): Config[T];
17
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Contract } from '@ethersproject/contracts';
2
+ export declare function getLandContract(): Promise<Contract | undefined>;
3
+ export declare function getEstateContract(): Promise<Contract | undefined>;
@@ -0,0 +1,2 @@
1
+ import 'decentraland-ui/lib/styles.css';
2
+ import 'decentraland-ui/lib/dark-theme.css';
@@ -0,0 +1,16 @@
1
+ import { Authorization } from './types';
2
+ export declare const FETCH_AUTHORIZATIONS_REQUEST = "[Request] Fetch LAND Authorizations";
3
+ export declare const FETCH_AUTHORIZATIONS_SUCCESS = "[Success] Fetch LAND Authorizations";
4
+ export declare const FETCH_AUTHORIZATIONS_FAILURE = "[Failure] Fetch LAND Authorizations";
5
+ export declare const fetchAuthorizationsRequest: (owner: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Fetch LAND Authorizations", {
6
+ owner: string;
7
+ }>;
8
+ export declare const fetchAuthorizationsSuccess: (authorizations: Authorization[]) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Fetch LAND Authorizations", {
9
+ authorizations: Authorization[];
10
+ }>;
11
+ export declare const fetchAuthorizationsFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Fetch LAND Authorizations", {
12
+ error: string;
13
+ }>;
14
+ export declare type FetchAuthorizationsRequestAction = ReturnType<typeof fetchAuthorizationsRequest>;
15
+ export declare type FetchAuthorizationsSuccessAction = ReturnType<typeof fetchAuthorizationsSuccess>;
16
+ export declare type FetchAuthorizationsFailureAction = ReturnType<typeof fetchAuthorizationsFailure>;
@@ -0,0 +1,9 @@
1
+ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer';
2
+ import { FetchAuthorizationsRequestAction, FetchAuthorizationsSuccessAction, FetchAuthorizationsFailureAction } from './actions';
3
+ export declare type AuthorizationState = {
4
+ data: any;
5
+ loading: LoadingState;
6
+ error: string | null;
7
+ };
8
+ export declare type AuthorizationReducerAction = FetchAuthorizationsRequestAction | FetchAuthorizationsSuccessAction | FetchAuthorizationsFailureAction;
9
+ export declare const authorizationReducer: (state: AuthorizationState | undefined, action: AuthorizationReducerAction) => AuthorizationState;
@@ -0,0 +1 @@
1
+ export declare function authorizationSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
@@ -0,0 +1,6 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("./reducer").AuthorizationState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("./reducer").AuthorizationState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("./reducer").AuthorizationState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("./reducer").AuthorizationState) => string | null>;
6
+ export declare const isUpdateAuthorized: import("reselect").OutputSelector<RootState, any, (res: any) => any>;
@@ -0,0 +1,4 @@
1
+ import { Coords } from '../land/types';
2
+ export declare type Authorization = Coords & {
3
+ isUpdateAuthorized: boolean;
4
+ };
@@ -0,0 +1,14 @@
1
+ import { LANDMeta, Coords } from './types';
2
+ export declare const FETCH_LAND_REQUEST = "[Request] Fetch LAND";
3
+ export declare const FETCH_LAND_SUCCESS = "[Success] Fetch LAND";
4
+ export declare const FETCH_LAND_FAILURE = "[Failure] Fetch LAND";
5
+ export declare const fetchLandRequest: (coords: Coords) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Fetch LAND", Coords>;
6
+ export declare const fetchLandSuccess: (land: LANDMeta) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Fetch LAND", {
7
+ land: LANDMeta;
8
+ }>;
9
+ export declare const fetchLandFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Fetch LAND", {
10
+ error: string;
11
+ }>;
12
+ export declare type FetchLandRequestAction = ReturnType<typeof fetchLandRequest>;
13
+ export declare type FetchLandSuccessAction = ReturnType<typeof fetchLandSuccess>;
14
+ export declare type FetchLandFailureAction = ReturnType<typeof fetchLandFailure>;
@@ -0,0 +1,9 @@
1
+ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer';
2
+ import { FetchLandRequestAction, FetchLandSuccessAction, FetchLandFailureAction } from './actions';
3
+ export declare type LandState = {
4
+ data: any;
5
+ loading: LoadingState;
6
+ error: string | null;
7
+ };
8
+ export declare type LandReducerAction = FetchLandRequestAction | FetchLandSuccessAction | FetchLandFailureAction;
9
+ export declare const landReducer: (state: LandState | undefined, action: LandReducerAction) => LandState;
@@ -0,0 +1 @@
1
+ export declare function landSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("./reducer").LandState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("./reducer").LandState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("./reducer").LandState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("./reducer").LandState) => string | null>;
@@ -0,0 +1,9 @@
1
+ export declare type Coords = {
2
+ x: number;
3
+ y: number;
4
+ };
5
+ export declare type LANDMeta = {
6
+ version: number;
7
+ name: string;
8
+ description: string;
9
+ };
@@ -0,0 +1,3 @@
1
+ import { LANDMeta, Coords } from './types';
2
+ export declare function getEmptyLandData(): LANDMeta;
3
+ export declare function coordsToString({ x, y }: Coords): string;
@@ -0,0 +1,20 @@
1
+ import { ChainId } from '@dcl/schemas';
2
+ import { AuthIdentity } from 'dcl-crypto';
3
+ export declare type LinkerResponseScenenDeploy = {
4
+ responseType: 'scene-deploy';
5
+ payload: {
6
+ address: string;
7
+ signature: string;
8
+ chainId: ChainId;
9
+ };
10
+ };
11
+ export declare type LinkerResponseIdentity = {
12
+ responseType: 'identity';
13
+ payload: {
14
+ address: string;
15
+ chainId: ChainId;
16
+ identity: AuthIdentity;
17
+ };
18
+ };
19
+ export declare type LinkerResponse = LinkerResponseScenenDeploy | LinkerResponseIdentity;
20
+ export declare function closeServer(ok: boolean, message: LinkerResponse): Promise<void>;
@@ -0,0 +1,27 @@
1
+ import { AuthIdentity } from 'dcl-crypto';
2
+ export declare const SIGN_CONTENT_REQUEST = "[Request] Sign Content";
3
+ export declare const SIGN_CONTENT_SUCCESS = "[Success] Sign Content";
4
+ export declare const SIGN_CONTENT_FAILURE = "[Failure] Sign Content";
5
+ export declare const signContentRequest: (cid: string) => import("typesafe-actions/dist/types").PayloadAction<"[Request] Sign Content", string>;
6
+ export declare const signContentSuccess: (signature: string) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Sign Content", {
7
+ signature: string;
8
+ }>;
9
+ export declare const signContentFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Sign Content", {
10
+ error: string;
11
+ }>;
12
+ export declare type SignContentRequestAction = ReturnType<typeof signContentRequest>;
13
+ export declare type SignContentSuccessAction = ReturnType<typeof signContentSuccess>;
14
+ export declare type SignContentFailureAction = ReturnType<typeof signContentFailure>;
15
+ export declare const CREATE_IDENTITY_REQUEST = "[Request] Create Identity";
16
+ export declare const CREATE_IDENTITY_SUCCESS = "[Success] Create Identity";
17
+ export declare const CREATE_IDENTITY_FAILURE = "[Failure] Create Identity";
18
+ export declare const createIdentityRequest: () => import("typesafe-actions/dist/types").PayloadAction<"[Request] Create Identity", {}>;
19
+ export declare const createIdentitySuccess: (identity: AuthIdentity) => import("typesafe-actions/dist/types").PayloadAction<"[Success] Create Identity", {
20
+ identity: AuthIdentity;
21
+ }>;
22
+ export declare const createIdentityFailure: (error: string) => import("typesafe-actions/dist/types").PayloadAction<"[Failure] Create Identity", {
23
+ error: string;
24
+ }>;
25
+ export declare type CreateIdentityRequestAction = ReturnType<typeof createIdentityRequest>;
26
+ export declare type CreateIdentitySuccessAction = ReturnType<typeof createIdentitySuccess>;
27
+ export declare type CreateIdentityFailureAction = ReturnType<typeof createIdentityFailure>;
@@ -0,0 +1,11 @@
1
+ import { AuthIdentity } from 'dcl-crypto';
2
+ import { LoadingState } from 'decentraland-dapps/dist/modules/loading/reducer';
3
+ import { SignContentRequestAction, SignContentSuccessAction, SignContentFailureAction, CreateIdentityRequestAction, CreateIdentitySuccessAction, CreateIdentityFailureAction } from './actions';
4
+ export declare type SignatureState = {
5
+ data: any;
6
+ identity: AuthIdentity | null;
7
+ loading: LoadingState;
8
+ error: string | null;
9
+ };
10
+ export declare type SignatureReducerAction = SignContentRequestAction | SignContentSuccessAction | SignContentFailureAction | CreateIdentityRequestAction | CreateIdentitySuccessAction | CreateIdentityFailureAction;
11
+ export declare const signatureReducer: (state: SignatureState | undefined, action: SignatureReducerAction) => SignatureState;
@@ -0,0 +1 @@
1
+ export declare function signatureSaga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("./reducer").SignatureState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("./reducer").SignatureState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("./reducer").SignatureState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("./reducer").SignatureState) => string | null>;
@@ -0,0 +1 @@
1
+ export declare function walletSaga(): Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown> | Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>>, void, unknown>;
@@ -0,0 +1,5 @@
1
+ import { RootState } from '../../types';
2
+ export declare const getState: (state: RootState) => import("../signature/reducer").SignatureState;
3
+ export declare const getData: import("reselect").OutputSelector<RootState, any, (res: import("../signature/reducer").SignatureState) => any>;
4
+ export declare const isLoading: import("reselect").OutputSelector<RootState, boolean, (res: import("../signature/reducer").SignatureState) => boolean>;
5
+ export declare const getError: import("reselect").OutputSelector<RootState, string | null, (res: import("../signature/reducer").SignatureState) => string | null>;
@@ -0,0 +1,2 @@
1
+ import { RootState } from './types';
2
+ export declare const rootReducer: import("redux").Reducer<import("redux").CombinedState<RootState>, import("redux").AnyAction>;
@@ -0,0 +1 @@
1
+ export declare function rootSaga(): () => Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown> | Generator<import("redux-saga/effects").AllEffect<Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown> | Generator<import("redux-saga/effects").AllEffect<import("redux-saga/effects").ForkEffect<never>>, void, unknown>>, void, unknown>>, void, unknown>;
@@ -0,0 +1 @@
1
+ export declare function initStore(): import("redux").Store<import("redux").EmptyObject & import("./types").RootState, import("redux").AnyAction>;
@@ -0,0 +1,14 @@
1
+ import { Reducer, Store } from 'redux';
2
+ import { WalletState } from 'decentraland-dapps/dist/modules/wallet/reducer';
3
+ import { TransactionState } from 'decentraland-dapps/dist/modules/transaction/reducer';
4
+ import { LandState } from './modules/land/reducer';
5
+ import { SignatureState } from './modules/signature/reducer';
6
+ import { AuthorizationState } from './modules/authorization/reducer';
7
+ export declare type RootState = {
8
+ wallet: WalletState;
9
+ transaction: TransactionState;
10
+ land: LandState;
11
+ authorization: AuthorizationState;
12
+ signature: SignatureState;
13
+ };
14
+ export declare type RootReducer = Reducer<Store<RootState>>;
@@ -1,2 +0,0 @@
1
- (this["webpackJsonp@dcl/linker-dapp"]=this["webpackJsonp@dcl/linker-dapp"]||[]).push([[0],{1004:function(e,t){},1006:function(e,t){},1018:function(e,t){},1039:function(e,t){},1041:function(e,t){},1319:function(e,t){},1339:function(e,t){},1340:function(e,t){},1717:function(e,t,n){},1922:function(e,t,n){},1925:function(e,t,n){"use strict";n.r(t);var a,s=n(152),r=n.n(s),i=n(802),u=n.n(i),o=n(189),p=n(168),c=n(834),d=n(816),l=n(817),y=n(818),m=n(344),f=n(101);function b(e){return e?("string"===typeof e?[e]:e).map((function(e){var t=e.split(","),n=Object(m.a)(t,2),a=n[0],s=n[1];return{x:parseInt(a,10),y:parseInt(s,10)}})):[{x:0,y:0}]}function v(){!function(){var e,t,n=new URLSearchParams(window.location.search);a={baseParcel:b(n.get("baseParcel"))[0],parcels:b(n.getAll("parcels")),wearableId:n.get("wearableId")||void 0,rootCID:n.get("rootCID")||"QmPjpPyibbryTCi75zzcdeuPUBcujtEqj43shwKBAdMojy",debug:"true"===n.get("debug"),estateRegistry:n.get("estateRegistry"),landRegistry:n.get("landRegistry"),chainId:"0x1"===(null===(e=window)||void 0===e||null===(t=e.ethereum)||void 0===t?void 0:t.chainId)?f.ChainId.ETHEREUM_MAINNET:f.ChainId.ETHEREUM_ROPSTEN}}()}function x(){var e,t;return"0x1"!==(null===(e=window)||void 0===e||null===(t=e.ethereum)||void 0===t?void 0:t.chainId)}function g(){var e;return!!(null===(e=a)||void 0===e?void 0:e.debug)}function j(e){return a[e]}var O=n(819),w=n(820),h=n(57),M=n(87),I=n(80),_="[Request] Fetch LAND",k="[Success] Fetch LAND",C="[Failure] Fetch LAND",A=function(e){return Object(I.action)(k,{land:e})},E={data:{},loading:[],error:null},L="[Request] Sign Content",R="[Success] Sign Content",U="[Failure] Sign Content",S=function(e){return Object(I.action)(U,{error:e})},D="[Request] Create Identity",T="[Success] Create Identity",z="[Failure] Create Identity",N=function(e){return Object(I.action)(T,{identity:e})},P={data:"",loading:[],identity:null,error:null},F="[Request] Fetch LAND Authorizations",W="[Success] Fetch LAND Authorizations",B="[Failure] Fetch LAND Authorizations",H=function(e){return Object(I.action)(W,{authorizations:e})},q={data:[],loading:[],error:null},J=Object(p.b)({wallet:O.walletReducer,transaction:w.transactionReducer,land:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t)});case k:return{loading:Object(M.loadingReducer)(e.loading,t),data:t.payload.land,error:null};case C:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),error:t.payload.error});default:return e}},signature:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case L:case D:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t)});case R:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),data:t.payload.signature,error:null});case U:case z:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),error:t.payload.error});case T:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),identity:t.payload.identity,error:null});default:return e}},authorization:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t)});case W:return{loading:Object(M.loadingReducer)(e.loading,t),data:t.payload.authorizations,error:null};case B:return Object(h.a)(Object(h.a)({},e),{},{loading:Object(M.loadingReducer)(e.loading,t),error:t.payload.error});default:return e}}}),G=n(1),K=n.n(G),Y=n(34),X=n(94),Q=n(821),V=n(22),Z=n(187),$=n(153),ee=n(471),te=n(822),ne=n(823),ae={};function se(){return re.apply(this,arguments)}function re(){return(re=Object(V.a)(K.a.mark((function e(){var t,n,a;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ae.land){e.next=5;break}return e.next=3,Object($.getConnectedProvider)();case 3:(t=e.sent)&&(n=j("landRegistry"),a=n||(x()?"0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b":"0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d"),ae.land=new Z.b(a,ne.a,new ee.a(t).getSigner()));case 5:return e.abrupt("return",ae.land);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(){return ue.apply(this,arguments)}function ue(){return(ue=Object(V.a)(K.a.mark((function e(){var t,n,a;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ae.estate){e.next=5;break}return e.next=3,Object($.getConnectedProvider)();case 3:(t=e.sent)&&(n=j("landRegistry"),a=n||(x()?"0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95":"0x959e104e1a4db6317fa58f8295f586e1a978c297"),ae.estate=new Z.b(a,te.a,new ee.a(t).getSigner()));case 5:return e.abrupt("return",ae.estate);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(e){var t=e.x,n=e.y;return"".concat(t,",").concat(n)}var pe=K.a.mark(le),ce=K.a.mark(ye),de=K.a.mark(me);function le(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeEvery)(_,ye);case 2:return e.next=4,Object(Y.takeEvery)(X.CONNECT_WALLET_SUCCESS,me);case 4:case"end":return e.stop()}}),pe)}function ye(e){var t,n,a,s,r,i;return K.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Object(Y.call)((function(){return se()}));case 2:return t=u.sent,u.prev=3,n=e.payload,a=n.x,s=n.y,u.next=7,Object(Y.call)((function(){return t.landData(a,s)}));case 7:if(!(r=u.sent)){u.next=14;break}return u.next=11,Object(Y.call)((function(){return fe(r)}));case 11:u.t0=u.sent,u.next=15;break;case 14:u.t0={version:0,name:"",description:""};case 15:return i=u.t0,u.next=18,Object(Y.put)(A(i));case 18:u.next=24;break;case 20:return u.prev=20,u.t1=u.catch(3),u.next=24,Object(Y.put)((o=u.t1.message,Object(I.action)(C,{error:o})));case 24:case"end":return u.stop()}var o}),ce,null,[[3,20]])}function me(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.put)((t=j("baseParcel"),Object(I.action)(_,t)));case 2:case"end":return e.stop()}var t}),de)}function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.charAt(0);if("0"===t){var n=Object(m.a)(Q.parse(e,{cellDelimiter:","})[0],4),a=n[0],s=n[1],r=n[2],i=n[3];return{version:a,name:s||"",description:r||"",ipns:i||""}}throw new Error('Unknown version when trying to decode land data: "'.concat(e,'"'))}var be=n(824),ve=K.a.mark(je),xe=K.a.mark(Oe),ge=K.a.mark(we);function je(){var e;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object(be.createWalletSaga)({CHAIN_ID:j("chainId")}),t.next=3,Object(Y.all)([e(),Oe()]);case 3:case"end":return t.stop()}}),ve)}function Oe(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeEvery)(X.CHANGE_NETWORK,we);case 2:return e.next=4,Object(Y.takeEvery)(X.CHANGE_ACCOUNT,we);case 4:case"end":return e.stop()}}),xe)}function we(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.call)((function(){return window.location.reload()}));case 2:case"end":return e.stop()}}),ge)}var he=n(74),Me=n(71),Ie=n(3);function _e(e,t){return ke.apply(this,arguments)}function ke(){return(ke=Object(V.a)(K.a.mark((function e(t,n){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/close?ok=".concat(t,"&reason=").concat(JSON.stringify(n)));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ce=n(825),Ae=K.a.mark(Se),Ee=K.a.mark(De),Le=K.a.mark(Te),Re=K.a.mark(ze),Ue=K.a.mark(Ne);function Se(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeLatest)(L,De);case 2:return e.next=4,Object(Y.takeEvery)(R,Te);case 4:return e.next=6,Object(Y.takeLatest)(D,ze);case 6:return e.next=8,Object(Y.takeLatest)(T,Ne);case 8:case"end":return e.stop()}}),Ae)}function De(e){var t,n,a,s,r,i;return K.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,t=Object(Me.f)(e.payload),u.next=4,Object(Y.call)((function(){return Object($.getConnectedProvider)()}));case 4:return n=u.sent,a=new ee.a(n),s=a.getSigner(),u.next=9,Object(Y.call)((function(){return s.getAddress()}));case 9:return r=u.sent,u.next=12,Object(Y.call)((function(){return n.send("personal_sign",[Object(Ie.i)(t),r.toLowerCase()])}));case 12:return i=u.sent,u.next=15,Object(Y.put)((o=i,Object(I.action)(R,{signature:o})));case 15:u.next=21;break;case 17:return u.prev=17,u.t0=u.catch(0),u.next=21,Object(Y.put)(S(u.t0.message));case 21:case"end":return u.stop()}var o}),Ee,null,[[0,17]])}function Te(e){var t,n,a;return K.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,Object(Y.select)(he.getAddress);case 2:return t=s.sent,s.next=5,Object(Y.select)(he.getChainId);case 5:return n=s.sent,a=e.payload.signature,s.prev=7,s.next=10,Object(Y.call)((function(){_e(!0,{responseType:"scene-deploy",payload:{signature:a,address:t,chainId:n}})}));case 10:s.next=16;break;case 12:return s.prev=12,s.t0=s.catch(7),s.next=16,Object(Y.put)(S(s.t0.message));case 16:case"end":return s.stop()}}),Le,null,[[7,12]])}function ze(e){var t,n,a,s;return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(Y.call)((function(){return Object($.getConnectedProvider)()}));case 3:return t=e.sent,n=new ee.a(t),a=n.getSigner(),e.next=8,function(){return Object(Ce.createIdentity)(a,1e3)};case 8:return s=e.sent,e.next=11,Object(Y.put)(N(s));case 11:e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(0),console.log({error:e.t0}),e.next=18,Object(Y.put)((r=e.t0.message,Object(I.action)(z,{error:r})));case 18:case"end":return e.stop()}var r}),Re,null,[[0,13]])}function Ne(e){var t,n,a;return K.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.payload.identity,s.next=3,Object(Y.select)(he.getAddress);case 3:return n=s.sent,s.next=6,Object(Y.select)(he.getChainId);case 6:return a=s.sent,s.prev=7,s.next=10,Object(Y.call)((function(){_e(!0,{responseType:"identity",payload:{identity:t,address:n,chainId:a}})}));case 10:s.next=16;break;case 12:return s.prev=12,s.t0=s.catch(7),s.next=16,Object(Y.put)(S(s.t0.message));case 16:case"end":return s.stop()}}),Ue,null,[[7,12]])}var Pe=n(122),Fe=n(480),We=K.a.mark(qe),Be=K.a.mark(Je),He=K.a.mark(Ge);function qe(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.takeEvery)(X.CONNECT_WALLET_SUCCESS,Ge);case 2:return e.next=4,Object(Y.takeEvery)(F,Je);case 4:case"end":return e.stop()}}),We)}function Je(){var e,t;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(Y.call)((function(){return se()}));case 2:return e=n.sent,n.next=5,Object(Y.call)((function(){return ie()}));case 5:return t=n.sent,n.prev=6,n.delegateYield(K.a.mark((function n(){var a,s,r,i,u,o,p,c,d,l,y,m,f,b,v;return K.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(Y.select)(he.getAddress);case 2:a=n.sent,s=new Map,r=[],i=Object(Fe.a)(j("parcels"));try{for(o=function(){var t=u.value,n=t.x,i=t.y,o=new Promise((function(r,u){e.encodeTokenId(n,i).then((function(o){e.isUpdateAuthorized(a,o).then((function(e){s.set(oe(t),o),r({x:n,y:i,isUpdateAuthorized:e})})).catch(u)})).catch(u)}));r.push(o)},i.s();!(u=i.n()).done;)o()}catch(x){i.e(x)}finally{i.f()}return n.next=9,Object(Y.call)((function(){return Promise.all(r)}));case 9:p=n.sent,c=p.filter((function(e){return!e.isUpdateAuthorized})),d=p.filter((function(e){return e.isUpdateAuthorized})),l=[],y=Object(Fe.a)(c);try{for(f=function(){var e=m.value,n=s.get(oe(e)),r=new Promise((function(s,r){t.getLandEstateId(n).then((function(n){return n&&n>0?t.isUpdateAuthorized(a,n).then((function(t){s(Object(h.a)(Object(h.a)({},e),{},{isUpdateAuthorized:t}))})):s(e)})).catch(r)}));l.push(r)},y.s();!(m=y.n()).done;)f()}catch(x){y.e(x)}finally{y.f()}return n.next=17,Object(Y.call)((function(){return Promise.all(l)}));case 17:return b=n.sent,v=[].concat(Object(Pe.a)(d),Object(Pe.a)(b)),n.next=21,Object(Y.put)(H(v));case 21:case"end":return n.stop()}}),n)}))(),"t0",8);case 8:n.next=14;break;case 10:return n.prev=10,n.t1=n.catch(6),n.next=14,Object(Y.put)((a=n.t1.message,Object(I.action)(B,{error:a})));case 14:case"end":return n.stop()}var a}),Be,null,[[6,10]])}function Ge(){var e;return K.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Y.call)((function(){return he.getAddress}));case 2:return e=t.sent,t.next=5,Object(Y.put)((n=e,Object(I.action)(F,{owner:n})));case 5:case"end":return t.stop()}var n}),He)}n(1715),n(1716);var Ke=n(186),Ye=n(111),Xe=function(e){return e.signature},Qe=Object(Ye.a)(Xe,(function(e){return e.data})),Ve=Object(Ye.a)(Xe,(function(e){return e.loading.length>0})),Ze=(Object(Ye.a)(Xe,(function(e){return e.error})),n(1717),n(124)),$e=n(0),et=n.n($e),tt=n(30),nt=et.a.memo((function(e){var t=e.children;return Object(tt.jsxs)("p",{style:{color:"var(--primary)"},children:[" Error: ",t]})}));function at(e){var t=e.isConnected,n=e.isConnecting,a=e.wallet,s=e.authorizations,r=e.isUpdateAuthorized,i=e.onConnectWallet;return t&&a.address?Object(tt.jsxs)(tt.Fragment,{children:[Object(tt.jsxs)("p",{children:["Using address: \xa0",Object(tt.jsx)(Ze.Blockie,{scale:3,seed:a.address,children:Object(tt.jsx)(Ze.Address,{tooltip:!0,strong:!0,value:a.address})})]}),(null===s||void 0===s?void 0:s.length)&&!r?Object(tt.jsx)(nt,{children:"You don't have permissions to update The following LANDs that are part of the scene: ".concat((s||[]).filter((function(e){return!e.isUpdateAuthorized})).map((function(e){return'"'.concat(oe(e),'"')})).join(", "))}):null]}):Object(tt.jsxs)(tt.Fragment,{children:[n?null:Object(tt.jsx)("p",{children:"Could not find any wallet"}),Object(tt.jsx)("p",{children:Object(tt.jsx)(Ze.Button,{primary:!0,onClick:i,loading:n,disabled:n,children:"Reconnect\xa0"})})]})}var st=Object(o.connect)((function(e){return{wallet:Object(he.getData)(e),isConnected:Object(he.isConnected)(e),isConnecting:Object(he.isConnecting)(e),signed:!!Qe(e),isSigning:Ve(e)}}),(function(e){return{onConnectWallet:function(){return e(Object(X.enableWalletRequest)(Ke.ProviderType.INJECTED))},onRequestIdentity:function(){return e(Object(I.action)(D,{}))}}}))((function(e){var t=e.isConnected,n=e.wallet,a=e.isConnecting,s=e.onConnectWallet,r=e.isSigning,i=e.onRequestIdentity;return Object(tt.jsxs)("div",{className:"LinkScenePage",children:[x()&&Object(tt.jsx)("div",{className:"warning",children:"Using Ropsten test network"}),Object(tt.jsx)(Ze.Navbar,{}),Object(tt.jsx)(Ze.Header,{children:"Create an identity to sign deployments "}),Object(tt.jsx)(at,{isUpdateAuthorized:!0,isConnected:t,isConnecting:a,wallet:n,onConnectWallet:s}),Object(tt.jsx)("form",{children:Object(tt.jsx)("div",{children:Object(tt.jsx)(Ze.Button,{primary:!0,onClick:function(e){e.preventDefault(),i()},disabled:!t,loading:r,children:"Sign ephemeral wallet"})})})]})})),rt=function(e){return e.land},it=Object(Ye.a)(rt,(function(e){return e.data})),ut=Object(Ye.a)(rt,(function(e){return e.loading.length>0})),ot=Object(Ye.a)(rt,(function(e){return e.error})),pt=function(e){return e.authorization},ct=Object(Ye.a)(pt,(function(e){return e.data})),dt=Object(Ye.a)(pt,(function(e){return e.loading.length>0})),lt=(Object(Ye.a)(pt,(function(e){return e.error})),Object(Ye.a)(ct,(function(e){if(null===e||void 0===e?void 0:e.length)return e.every((function(e){return e.isUpdateAuthorized}))})));n(1922);function yt(e){var t,n=e.deployUrl,a=null!==(t=e.base.name)&&void 0!==t?t:"LAND without name",s=j("baseParcel"),r=s.x,i=s.y;return Object(tt.jsxs)("p",{children:["Updating ",Object(tt.jsx)("b",{children:a})," ",Object(tt.jsxs)("a",{href:n,target:"_blank",rel:"noreferrer",children:["at coordinates ",r,", ",i]})]})}var mt=Object(o.connect)((function(e){return{base:it(e),wallet:Object(he.getData)(e),isLandLoading:ut(e),isConnected:Object(he.isConnected)(e),isConnecting:Object(he.isConnecting)(e),error:ot(e),signed:!!Qe(e),isUpdateAuthorized:lt(e),authorizations:ct(e),isAuthorizationLoading:dt(e),isSigning:Ve(e)}}),(function(e){return{onConnectWallet:function(){return e(Object(X.enableWalletRequest)(Ke.ProviderType.INJECTED))},onSignContent:function(t){return e(function(e){return Object(I.action)(L,e)}(t))}}}))((function(e){var t=e.isConnected,n=e.wallet,a=e.authorizations,s=e.isUpdateAuthorized,r=e.isConnecting,i=e.onConnectWallet,u=e.isSigning,o=e.base,p=e.error,c=e.isAuthorizationLoading,d=e.signed,l=j("baseParcel"),y=l.x,m=l.y,b=j("rootCID"),v=(null===n||void 0===n?void 0:n.chainId)===f.ChainId.ETHEREUM_ROPSTEN,x=v?"zone":"org",O="https://play.decentraland.".concat(x,"/?position=").concat(y,",").concat(m);return Object(tt.jsxs)("div",{className:"LinkScenePage",children:[v&&Object(tt.jsx)("div",{className:"warning",children:"Using Ropsten test network"}),Object(tt.jsx)(Ze.Navbar,{}),Object(tt.jsx)(Ze.Header,{children:"Update LAND data"}),Object(tt.jsx)(at,{authorizations:a,isUpdateAuthorized:s,isConnected:t,isConnecting:r,wallet:n,onConnectWallet:i}),Object(tt.jsx)("div",{children:Object(tt.jsx)("img",{style:{maxWidth:"100%",maxHeight:"100%",width:"35%"},className:"map",src:"https://api.decentraland.".concat(x,"/v1/parcels/").concat(y,"/").concat(m,"/map.png"),alt:"Base parcel ".concat(y,",").concat(m)})}),Object(tt.jsx)(yt,{deployUrl:O,base:o}),Object(tt.jsxs)("p",{children:["Project CID: ",Object(tt.jsx)("b",{children:b})]}),t&&d&&Object(tt.jsxs)("p",{children:["Content was succesfully signed and it's being uploaded"," ",Object(tt.jsx)("a",{href:O,target:"_blank",rel:"noreferrer",children:"here"}),". You can close this page and check the CLI for more info."]}),Object(tt.jsx)("form",{children:Object(tt.jsx)("div",{children:Object(tt.jsx)(Ze.Button,{primary:!0,onClick:function(t){t.preventDefault(),(0,e.onSignContent)(j("rootCID"))},disabled:!t||!!p||c||!s,loading:u,children:"Sign and Deploy"})})}),p?g()?Object(tt.jsx)(nt,{children:p}):Object(tt.jsx)(nt,{children:"There was an unexpected error."}):null]})})),ft=function(e){return new URLSearchParams(document.location.search).has("wearableId")?Object(tt.jsx)(st,Object(h.a)({},e)):Object(tt.jsx)(mt,Object(h.a)({},e))};r.a.render(Object(tt.jsx)(o.Provider,{store:function(){v();var e=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||p.c,t=Object(y.createStorageMiddleware)({storageKey:"decentraland-linker"}),n=t.storageMiddleware,a=t.loadStorageMiddleware,s=Object(c.a)(),r=Object(l.createTransactionMiddleware)(),i=Object(d.createLogger)({collapsed:function(){return!0},predicate:function(e,t){return!1}}),u=e(Object(p.a)(s,i,n,r)),o=Object(p.d)(J,u);return s.run(K.a.mark((function e(){return K.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.all)([je(),le(),Se(),qe()]);case 2:case"end":return e.stop()}}),e)}))),a(o),o}(),children:Object(tt.jsx)(u.a,{children:Object(tt.jsx)(ft,{})})}),document.getElementById("root"))},822:function(e){e.exports=JSON.parse('{"a":[{"constant":true,"inputs":[{"name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"updateManager","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"landIdEstate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"estateLandIds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"registry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"updateOperator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"estateLandIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"contractName","type":"string"},{"name":"migrationId","type":"string"}],"name":"isMigrated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":false,"name":"_data","type":"string"}],"name":"CreateEstate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_landId","type":"uint256"}],"name":"AddLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_landId","type":"uint256"},{"indexed":true,"name":"_destinatary","type":"address"}],"name":"RemoveLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_assetId","type":"uint256"},{"indexed":true,"name":"_holder","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_data","type":"string"}],"name":"Update","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_operator","type":"address"}],"name":"UpdateOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":true,"name":"_caller","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"UpdateManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_registry","type":"address"}],"name":"SetLANDRegistry","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"contractName","type":"string"},{"indexed":false,"name":"migrationId","type":"string"}],"name":"Migrated","type":"event"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"metadata","type":"string"}],"name":"mint","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"destinatary","type":"address"}],"name":"transferLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landIds","type":"uint256[]"},{"name":"destinatary","type":"address"}],"name":"transferManyLands","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"landId","type":"uint256"}],"name":"getLandEstateId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_registry","type":"address"}],"name":"setLANDRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ping","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getEstateSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"metadata","type":"string"}],"name":"updateMetadata","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getMetadata","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"estateId","type":"uint256"}],"name":"isUpdateAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"name":"setUpdateManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setLandUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_registry","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_operator","type":"address"},{"name":"_from","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"onERC721Received","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getFingerprint","outputs":[{"name":"result","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"},{"name":"fingerprint","type":"bytes"}],"name":"verifyFingerprint","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"estateIds","type":"uint256[]"}],"name":"safeTransferManyFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"estateIds","type":"uint256[]"},{"name":"data","type":"bytes"}],"name":"safeTransferManyFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"data","type":"string"}],"name":"updateLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landIds","type":"uint256[]"},{"name":"data","type":"string"}],"name":"updateManyLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]}')},823:function(e){e.exports=JSON.parse('{"a":[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"updateManager","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"assetId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"latestPing","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"assetId","type":"uint256"}],"name":"isAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"authorizedDeploy","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"assetId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"assetId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"tokensOf","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GET_METADATA","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"description","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"updateOperator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"authorized","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"assetId","type":"uint256"},{"name":"userData","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"estateRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetHolder","type":"address"},{"name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"getApprovedAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"registry","type":"address"}],"name":"EstateRegistrySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":true,"name":"holder","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"data","type":"string"}],"name":"Update","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":true,"name":"operator","type":"address"}],"name":"UpdateOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":true,"name":"_caller","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"UpdateManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_caller","type":"address"},{"indexed":true,"name":"_deployer","type":"address"}],"name":"DeployAuthorized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_caller","type":"address"},{"indexed":true,"name":"_deployer","type":"address"}],"name":"DeployForbidden","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":false,"name":"operator","type":"address"},{"indexed":false,"name":"userData","type":"bytes"},{"indexed":false,"name":"operatorData","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"},{"indexed":false,"name":"operator","type":"address"},{"indexed":false,"name":"userData","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"holder","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"authorized","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":true,"name":"assetId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_prevOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"},{"constant":false,"inputs":[{"name":"","type":"bytes"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"assetId","type":"uint256"}],"name":"isUpdateAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"authorizeDeploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"forbidDeploy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"beneficiary","type":"address"}],"name":"assignNewParcel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"beneficiary","type":"address"}],"name":"assignMultipleParcels","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ping","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"}],"name":"setLatestToNow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"encodeTokenId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"value","type":"uint256"}],"name":"decodeTokenId","outputs":[{"name":"","type":"int256"},{"name":"","type":"int256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"ownerOfLand","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"}],"name":"ownerOfLandMany","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"landOf","outputs":[{"name":"","type":"int256[]"},{"name":"","type":"int256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"assetId","type":"uint256"}],"name":"tokenMetadata","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"}],"name":"landData","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"assetId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"to","type":"address"}],"name":"transferLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"to","type":"address"}],"name":"transferManyLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"estateId","type":"uint256"}],"name":"transferLandToEstate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"estateId","type":"uint256"}],"name":"transferManyLandToEstate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"assetId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"name":"setUpdateManager","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"registry","type":"address"}],"name":"setEstateRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"beneficiary","type":"address"}],"name":"createEstate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"beneficiary","type":"address"},{"name":"metadata","type":"string"}],"name":"createEstateWithMetadata","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256"},{"name":"y","type":"int256"},{"name":"data","type":"string"}],"name":"updateLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"int256[]"},{"name":"y","type":"int256[]"},{"name":"data","type":"string"}],"name":"updateManyLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]}')},927:function(e,t){},944:function(e,t){},981:function(e,t){},983:function(e,t){}},[[1925,1,2]]]);
2
- //# sourceMappingURL=main.faca3684.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["config.ts","modules/land/actions.ts","modules/land/reducer.ts","modules/signature/actions.ts","modules/signature/reducer.ts","modules/authorization/actions.ts","modules/authorization/reducer.ts","reducer.ts","contracts.ts","modules/land/utils.ts","modules/land/sagas.ts","modules/wallet/sagas.ts","modules/server/utils.ts","modules/signature/sagas.ts","modules/authorization/sagas.ts","modules/signature/selectors.ts","components/Error.tsx","components/RenderWalletData/RenderWalletData.tsx","components/IdentityPage/IdentityPage.container.tsx","components/IdentityPage/index.ts","components/IdentityPage/IdentityPage.tsx","modules/land/selectors.ts","modules/authorization/selectors.ts","components/LandInfo/LandInfo.tsx","components/LinkerPage/LinkerPage.container.tsx","components/LinkerPage/index.ts","components/LinkerPage/LinkerPage.tsx","components/Root.tsx","index.tsx","store.ts","sagas.ts"],"names":["config","parseCoords","query","map","c","split","x","y","parseInt","init","searchParams","URLSearchParams","window","location","search","baseParcel","get","parcels","getAll","wearableId","undefined","rootCID","debug","estateRegistry","landRegistry","chainId","ethereum","ChainId","ETHEREUM_MAINNET","ETHEREUM_ROPSTEN","setConfig","isRopsten","isDevelopment","getConfig","key","FETCH_LAND_REQUEST","FETCH_LAND_SUCCESS","FETCH_LAND_FAILURE","fetchLandSuccess","land","action","INITIAL_STATE","data","loading","error","SIGN_CONTENT_REQUEST","SIGN_CONTENT_SUCCESS","SIGN_CONTENT_FAILURE","signContentFailure","CREATE_IDENTITY_REQUEST","CREATE_IDENTITY_SUCCESS","CREATE_IDENTITY_FAILURE","createIdentitySuccess","identity","FETCH_AUTHORIZATIONS_REQUEST","FETCH_AUTHORIZATIONS_SUCCESS","FETCH_AUTHORIZATIONS_FAILURE","fetchAuthorizationsSuccess","authorizations","rootReducer","combineReducers","wallet","transaction","state","type","loadingReducer","payload","signature","authorization","contractInstances","getLandContract","a","getConnectedProvider","provider","address","Contract","LANDRegistry","Web3Provider","getSigner","getEstateContract","estate","EstateRegistry","coordsToString","landSaga","handleFetchLandRequest","handleConnectWalletSuccess","takeEvery","CONNECT_WALLET_SUCCESS","call","decodeLandData","version","name","description","put","message","coords","charAt","CSV","cellDelimiter","ipns","Error","walletSaga","fullWalletSaga","handleWallet","baseWalletSaga","createWalletSaga","CHAIN_ID","all","CHANGE_NETWORK","CHANGE_ACCOUNT","reload","closeServer","ok","fetch","JSON","stringify","signatureSaga","handleSignContentRequest","handleSignContentSuccess","handleCreateIdentityRequest","handleCreateIdentitySuccess","takeLatest","dataToSign","toUtf8Bytes","web3provider","signer","getAddress","addr","send","hexlify","toLowerCase","signedMessage","select","getChainId","responseType","_action","createIdentity","console","log","authorizationSaga","handleFetchAuthorizationsRequest","assetIds","Map","pAuthorizations","parcel","pAuthorization","Promise","resolve","reject","then","assetId","isUpdateAuthorized","set","catch","push","f","parcelAuthorizations","notAllowedAuthorizations","filter","allowedAuthorizations","pEstateAuthorizations","estateAuthorizations","owner","getState","getData","createSelector","isLoading","length","React","memo","children","style","color","RenderWalletData","isConnected","isConnecting","onConnectWallet","scale","seed","tooltip","strong","value","join","primary","onClick","disabled","IdentityPage","connect","getWallet","signed","getSignature","isSigning","isSigningTx","dispatch","enableWalletRequest","ProviderType","INJECTED","onRequestIdentity","props","className","e","preventDefault","getError","every","LandInfo","deployUrl","base","href","target","rel","LinkerPage","getLand","isLandLoading","getLandError","getAuthorizations","isAuthorizationLoading","onSignContent","cid","signContentRequest","networkName","maxWidth","maxHeight","width","src","alt","Root","document","has","ReactDOM","render","store","initConfig","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","createStorageMiddleware","storageKey","storageMiddleware","loadStorageMiddleware","sagasMiddleware","createSagasMiddleware","transactionMiddleware","createTransactionMiddleware","loggerMiddleware","createLogger","collapsed","predicate","_","enhancer","applyMiddleware","createStore","run","initStore","getElementById"],"mappings":"8VAeIA,E,4GAEJ,SAASC,EAAYC,GACnB,OAAKA,GAC2B,kBAAVA,EAAqB,CAACA,GAASA,GACvCC,KAAI,SAAAC,GAChB,MAAeA,EAAEC,MAAM,KAAvB,mBAAOC,EAAP,KAAUC,EAAV,KACA,MAAO,CAAED,EAAGE,SAASF,EAAG,IAAKC,EAAGC,SAASD,EAAG,QAJ3B,CAAC,CAAED,EAAG,EAAGC,EAAG,IAgC1B,SAASE,KAnBhB,WAAsB,IAAD,IACbC,EAAe,IAAIC,gBAAgBC,OAAOC,SAASC,QACzDd,EAAS,CACPe,WAAYd,EAAYS,EAAaM,IAAI,eAAe,GACxDC,QAAShB,EAAYS,EAAaQ,OAAO,YACzCC,WAAYT,EAAaM,IAAI,oBAAiBI,EAC9CC,QACEX,EAAaM,IAAI,YACjB,iDACFM,MAAqC,SAA9BZ,EAAaM,IAAI,SACxBO,eAAgBb,EAAaM,IAAI,kBACjCQ,aAAcd,EAAaM,IAAI,gBAC/BS,QACyC,SAAvC,UAACb,cAAD,iBAAC,EAAQc,gBAAT,eAA2BD,SACvBE,UAAQC,iBACRD,UAAQE,kBAKhBC,GAGK,SAASC,IAAa,IAAD,IAC1B,MAA8C,SAAvC,UAACnB,cAAD,iBAAC,EAAQc,gBAAT,eAA2BD,SAG7B,SAASO,IAA0B,IAAD,EACvC,SAAQ,UAAChC,SAAD,aAAC,EAAQsB,OAGZ,SAASW,EAAkCC,GAChD,OAAQlC,EAAkBkC,G,8CC5DfC,EAAqB,uBACrBC,EAAqB,uBACrBC,EAAqB,uBAIrBC,EAAmB,SAACC,GAAD,OAC9BC,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AC,GAAD,UAAQY,IAER,eAAC,GAAD,6CAEA,WChFKqL,GAVF,SAAC3B,GAGZ,OAFW,IAAI3L,gBAAgBuN,SAASrN,SAASC,QAE1CqN,IAAI,cACF,eAAC,GAAD,eAAkB7B,IAGpB,eAACY,GAAD,eAAgBZ,KCAzB8B,IAASC,OACP,eAAC,WAAD,CAAUC,MCFL,WACLC,IACA,IAAMC,EACH5N,OAAe6N,sCAAwCC,IAE1D,EAAqDC,kCAAwB,CAC3EC,WAAY,wBADNC,EAAR,EAAQA,kBAAmBC,EAA3B,EAA2BA,sBAGrBC,EAAkBC,cAClBC,EAAwBC,wCACxBC,EAAmBC,uBAAa,CACpCC,UAAW,kBAAM,GACjBC,UAAW,SAACC,EAAGhH,GAAJ,OAAgB,KAUvBiH,EAAWhB,EAPEiB,YACjBV,EACAI,EACAN,EACAI,IAIIX,EAAQoB,YAAY/L,EAAa6L,GAKvC,OAHAT,EAAgBY,IC3BhB,UAAO,8EACL,OADK,SACChJ,cAAI,CAACN,KAAclB,KAAYiC,KAAiBuB,OADjD,2CD4BPmG,EAAsBR,GAEfA,ED1BUsB,GAAjB,SACE,eAAC,IAAD,UACE,eAAC,GAAD,QAGJ1B,SAAS2B,eAAe,U","file":"static/js/main.faca3684.chunk.js","sourcesContent":["import { ChainId } from '@dcl/schemas'\n\nimport { Coords } from './modules/land/types'\n\ntype Config = {\n baseParcel: Coords\n parcels: Coords[]\n rootCID: string\n debug: boolean\n estateRegistry?: string\n landRegistry?: string\n chainId: ChainId\n wearableId?: string\n}\n\nlet config: Config | undefined\n\nfunction parseCoords(query: string | string[] | null): Coords[] {\n if (!query) return [{ x: 0, y: 0 }]\n const coords = typeof query === 'string' ? [query] : query\n return coords.map(c => {\n const [x, y] = c.split(',')\n return { x: parseInt(x, 10), y: parseInt(y, 10) }\n })\n}\n\ntype UrlFinder = {\n get: (key: keyof Config) => string | null\n getAll: (key: keyof Config) => string[] | null\n}\n\nfunction setConfig() {\n const searchParams = new URLSearchParams(window.location.search) as UrlFinder\n config = {\n baseParcel: parseCoords(searchParams.get('baseParcel'))[0],\n parcels: parseCoords(searchParams.getAll('parcels')),\n wearableId: searchParams.get('wearableId') || undefined,\n rootCID:\n searchParams.get('rootCID') ||\n 'QmPjpPyibbryTCi75zzcdeuPUBcujtEqj43shwKBAdMojy',\n debug: searchParams.get('debug') === 'true',\n estateRegistry: searchParams.get('estateRegistry') as string,\n landRegistry: searchParams.get('landRegistry') as string,\n chainId:\n (window?.ethereum as any)?.chainId === '0x1'\n ? ChainId.ETHEREUM_MAINNET\n : ChainId.ETHEREUM_ROPSTEN\n }\n}\n\nexport function init() {\n setConfig()\n}\n\nexport function isRopsten() {\n return (window?.ethereum as any)?.chainId !== '0x1'\n}\n\nexport function isDevelopment(): boolean {\n return !!config?.debug\n}\n\nexport function getConfig<T extends keyof Config>(key: T) {\n return (config as Config)[key]\n}\n","import { action } from 'typesafe-actions'\nimport { LANDMeta, Coords } from './types'\n\nexport const FETCH_LAND_REQUEST = '[Request] Fetch LAND'\nexport const FETCH_LAND_SUCCESS = '[Success] Fetch LAND'\nexport const FETCH_LAND_FAILURE = '[Failure] Fetch LAND'\n\nexport const fetchLandRequest = (coords: Coords) =>\n action(FETCH_LAND_REQUEST, coords)\nexport const fetchLandSuccess = (land: LANDMeta) =>\n action(FETCH_LAND_SUCCESS, { land })\nexport const fetchLandFailure = (error: string) =>\n action(FETCH_LAND_FAILURE, { error })\n\nexport type FetchLandRequestAction = ReturnType<typeof fetchLandRequest>\nexport type FetchLandSuccessAction = ReturnType<typeof fetchLandSuccess>\nexport type FetchLandFailureAction = ReturnType<typeof fetchLandFailure>\n","import {\n loadingReducer,\n LoadingState\n} from 'decentraland-dapps/dist/modules/loading/reducer'\n\nimport {\n FetchLandRequestAction,\n FetchLandSuccessAction,\n FetchLandFailureAction,\n FETCH_LAND_REQUEST,\n FETCH_LAND_FAILURE,\n FETCH_LAND_SUCCESS\n} from './actions'\n\nexport type LandState = {\n data: any\n loading: LoadingState\n error: string | null\n}\n\nconst INITIAL_STATE: LandState = {\n data: {},\n loading: [],\n error: null\n}\n\nexport type LandReducerAction =\n | FetchLandRequestAction\n | FetchLandSuccessAction\n | FetchLandFailureAction\n\nexport const landReducer = (\n state = INITIAL_STATE,\n action: LandReducerAction\n): LandState => {\n switch (action.type) {\n case FETCH_LAND_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case FETCH_LAND_SUCCESS:\n return {\n loading: loadingReducer(state.loading, action),\n data: action.payload.land,\n error: null\n }\n case FETCH_LAND_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n default: {\n return state\n }\n }\n}\n","import { AuthIdentity } from 'dcl-crypto'\nimport { action } from 'typesafe-actions'\n\nexport const SIGN_CONTENT_REQUEST = '[Request] Sign Content'\nexport const SIGN_CONTENT_SUCCESS = '[Success] Sign Content'\nexport const SIGN_CONTENT_FAILURE = '[Failure] Sign Content'\n\nexport const signContentRequest = (cid: string) =>\n action(SIGN_CONTENT_REQUEST, cid)\nexport const signContentSuccess = (signature: string) =>\n action(SIGN_CONTENT_SUCCESS, { signature })\nexport const signContentFailure = (error: string) =>\n action(SIGN_CONTENT_FAILURE, { error })\n\nexport type SignContentRequestAction = ReturnType<typeof signContentRequest>\nexport type SignContentSuccessAction = ReturnType<typeof signContentSuccess>\nexport type SignContentFailureAction = ReturnType<typeof signContentFailure>\n\nexport const CREATE_IDENTITY_REQUEST = '[Request] Create Identity'\nexport const CREATE_IDENTITY_SUCCESS = '[Success] Create Identity'\nexport const CREATE_IDENTITY_FAILURE = '[Failure] Create Identity'\n\nexport const createIdentityRequest = () => action(CREATE_IDENTITY_REQUEST, {})\nexport const createIdentitySuccess = (identity: AuthIdentity) =>\n action(CREATE_IDENTITY_SUCCESS, { identity })\nexport const createIdentityFailure = (error: string) =>\n action(CREATE_IDENTITY_FAILURE, { error })\n\nexport type CreateIdentityRequestAction = ReturnType<\n typeof createIdentityRequest\n>\nexport type CreateIdentitySuccessAction = ReturnType<\n typeof createIdentitySuccess\n>\nexport type CreateIdentityFailureAction = ReturnType<\n typeof createIdentityFailure\n>\n","import { AuthIdentity } from 'dcl-crypto'\nimport {\n loadingReducer,\n LoadingState\n} from 'decentraland-dapps/dist/modules/loading/reducer'\n\nimport {\n SignContentRequestAction,\n SignContentSuccessAction,\n SignContentFailureAction,\n SIGN_CONTENT_REQUEST,\n SIGN_CONTENT_SUCCESS,\n SIGN_CONTENT_FAILURE,\n CreateIdentityRequestAction,\n CreateIdentitySuccessAction,\n CreateIdentityFailureAction,\n CREATE_IDENTITY_REQUEST,\n CREATE_IDENTITY_SUCCESS,\n CREATE_IDENTITY_FAILURE\n} from './actions'\n\nexport type SignatureState = {\n data: any\n identity: AuthIdentity | null\n loading: LoadingState\n error: string | null\n}\n\nconst INITIAL_STATE: SignatureState = {\n data: '',\n loading: [],\n identity: null,\n error: null\n}\n\nexport type SignatureReducerAction =\n | SignContentRequestAction\n | SignContentSuccessAction\n | SignContentFailureAction\n | CreateIdentityRequestAction\n | CreateIdentitySuccessAction\n | CreateIdentityFailureAction\n\nexport const signatureReducer = (\n state = INITIAL_STATE,\n action: SignatureReducerAction\n): SignatureState => {\n switch (action.type) {\n case SIGN_CONTENT_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case SIGN_CONTENT_SUCCESS:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n data: action.payload.signature,\n error: null\n }\n case SIGN_CONTENT_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n case CREATE_IDENTITY_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case CREATE_IDENTITY_SUCCESS:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n identity: action.payload.identity,\n error: null\n }\n case CREATE_IDENTITY_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n default: {\n return state\n }\n }\n}\n","import { action } from 'typesafe-actions'\nimport { Authorization } from './types'\n\nexport const FETCH_AUTHORIZATIONS_REQUEST =\n '[Request] Fetch LAND Authorizations'\nexport const FETCH_AUTHORIZATIONS_SUCCESS =\n '[Success] Fetch LAND Authorizations'\nexport const FETCH_AUTHORIZATIONS_FAILURE =\n '[Failure] Fetch LAND Authorizations'\n\nexport const fetchAuthorizationsRequest = (owner: string) =>\n action(FETCH_AUTHORIZATIONS_REQUEST, { owner })\n\nexport const fetchAuthorizationsSuccess = (authorizations: Authorization[]) =>\n action(FETCH_AUTHORIZATIONS_SUCCESS, { authorizations })\n\nexport const fetchAuthorizationsFailure = (error: string) =>\n action(FETCH_AUTHORIZATIONS_FAILURE, { error })\n\nexport type FetchAuthorizationsRequestAction = ReturnType<\n typeof fetchAuthorizationsRequest\n>\nexport type FetchAuthorizationsSuccessAction = ReturnType<\n typeof fetchAuthorizationsSuccess\n>\nexport type FetchAuthorizationsFailureAction = ReturnType<\n typeof fetchAuthorizationsFailure\n>\n","import {\n loadingReducer,\n LoadingState\n} from 'decentraland-dapps/dist/modules/loading/reducer'\n\nimport {\n FetchAuthorizationsRequestAction,\n FetchAuthorizationsSuccessAction,\n FetchAuthorizationsFailureAction,\n FETCH_AUTHORIZATIONS_REQUEST,\n FETCH_AUTHORIZATIONS_SUCCESS,\n FETCH_AUTHORIZATIONS_FAILURE\n} from './actions'\n\nexport type AuthorizationState = {\n data: any\n loading: LoadingState\n error: string | null\n}\n\nconst INITIAL_STATE: AuthorizationState = {\n data: [],\n loading: [],\n error: null\n}\n\nexport type AuthorizationReducerAction =\n | FetchAuthorizationsRequestAction\n | FetchAuthorizationsSuccessAction\n | FetchAuthorizationsFailureAction\n\nexport const authorizationReducer = (\n state = INITIAL_STATE,\n action: AuthorizationReducerAction\n): AuthorizationState => {\n switch (action.type) {\n case FETCH_AUTHORIZATIONS_REQUEST:\n return {\n ...state,\n loading: loadingReducer(state.loading, action)\n }\n case FETCH_AUTHORIZATIONS_SUCCESS:\n return {\n loading: loadingReducer(state.loading, action),\n data: action.payload.authorizations,\n error: null\n }\n case FETCH_AUTHORIZATIONS_FAILURE:\n return {\n ...state,\n loading: loadingReducer(state.loading, action),\n error: action.payload.error\n }\n default: {\n return state\n }\n }\n}\n","import { combineReducers } from 'redux'\nimport { walletReducer as wallet } from 'decentraland-dapps/dist/modules/wallet/reducer'\nimport { transactionReducer as transaction } from 'decentraland-dapps/dist/modules/transaction/reducer'\n\nimport { landReducer as land } from './modules/land/reducer'\nimport { signatureReducer as signature } from './modules/signature/reducer'\nimport { authorizationReducer as authorization } from './modules/authorization/reducer'\nimport { RootState } from './types'\n\nexport const rootReducer = combineReducers<RootState>({\n wallet,\n transaction,\n land,\n signature,\n authorization\n})\n","import { Contract } from '@ethersproject/contracts'\nimport { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth'\nimport { Web3Provider } from '@ethersproject/providers'\n\nimport * as EstateRegistry from './abis/EstateRegistry.json'\nimport * as LANDRegistry from './abis/LANDRegistry.json'\nimport { getConfig, isRopsten } from './config'\n\nconst contractInstances: {\n land?: Contract\n estate?: Contract\n} = {}\n\nexport async function getLandContract() {\n if (!contractInstances.land) {\n const provider = await getConnectedProvider()\n if (provider) {\n const landRegistry = getConfig('landRegistry')\n const address =\n landRegistry ||\n (isRopsten()\n ? '0x7a73483784ab79257bb11b96fd62a2c3ae4fb75b'\n : '0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d')\n contractInstances.land = new Contract(\n address,\n LANDRegistry.abi,\n new Web3Provider(provider).getSigner()\n )\n }\n }\n\n return contractInstances.land\n}\n\nexport async function getEstateContract() {\n if (!contractInstances.estate) {\n const provider = await getConnectedProvider()\n if (provider) {\n const estateRegistry = getConfig('landRegistry')\n const address =\n estateRegistry ||\n (isRopsten()\n ? '0x124bf28a423b2ca80b3846c3aa0eb944fe7ebb95'\n : '0x959e104e1a4db6317fa58f8295f586e1a978c297')\n contractInstances.estate = new Contract(\n address,\n EstateRegistry.abi,\n new Web3Provider(provider).getSigner()\n )\n }\n }\n\n return contractInstances.estate\n}\n","import { LANDMeta, Coords } from './types'\n\nexport function getEmptyLandData(): LANDMeta {\n return {\n version: 0,\n name: '',\n description: ''\n }\n}\n\nexport function coordsToString({ x, y }: Coords): string {\n return `${x},${y}`\n}\n","import { call, put, takeEvery } from 'redux-saga/effects'\nimport { CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport * as CSV from 'comma-separated-values'\n\nimport { getConfig } from '../../config'\nimport { getLandContract } from '../../contracts'\nimport {\n FETCH_LAND_REQUEST,\n FetchLandRequestAction,\n fetchLandSuccess,\n fetchLandFailure,\n fetchLandRequest\n} from './actions'\nimport { getEmptyLandData } from './utils'\nimport { Contract } from '@ethersproject/contracts'\nimport { LANDMeta } from './types'\n\nexport function* landSaga() {\n yield takeEvery(FETCH_LAND_REQUEST, handleFetchLandRequest)\n yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)\n}\n\nfunction* handleFetchLandRequest(action: FetchLandRequestAction) {\n const LANDRegistry: Contract = yield call(() => getLandContract())\n try {\n const { x, y } = action.payload\n const data: string = yield call(() => LANDRegistry['landData'](x, y))\n const land: LANDMeta = data\n ? yield call(() => decodeLandData(data))\n : getEmptyLandData()\n yield put(fetchLandSuccess(land))\n } catch (error) {\n yield put(fetchLandFailure((error as Error).message))\n }\n}\n\nfunction* handleConnectWalletSuccess() {\n yield put(fetchLandRequest(getConfig('baseParcel')))\n}\n\nfunction decodeLandData(data = '') {\n const version = data.charAt(0)\n switch (version) {\n case '0': {\n const [version, name, description, ipns] = CSV.parse(data, {\n cellDelimiter: ','\n })[0]\n\n return {\n version,\n // when a value is blank, csv.parse returns 0, so we fallback to empty string\n // to support stuff like `0,,,ipns:link`\n name: name || '',\n description: description || '',\n ipns: ipns || ''\n }\n }\n default:\n throw new Error(\n `Unknown version when trying to decode land data: \"${data}\"`\n )\n }\n}\n","import { takeEvery, all, call } from 'redux-saga/effects'\nimport { createWalletSaga } from 'decentraland-dapps/dist/modules/wallet/sagas'\nimport {\n CHANGE_NETWORK,\n CHANGE_ACCOUNT\n} from 'decentraland-dapps/dist/modules/wallet/actions'\n\nimport { getConfig } from '../../config'\n\nexport function* walletSaga() {\n const baseWalletSaga = createWalletSaga({\n CHAIN_ID: getConfig('chainId')\n })\n yield all([baseWalletSaga(), fullWalletSaga()])\n}\n\nfunction* fullWalletSaga() {\n yield takeEvery(CHANGE_NETWORK, handleWallet)\n yield takeEvery(CHANGE_ACCOUNT, handleWallet)\n}\n\nfunction* handleWallet() {\n yield call(() => window.location.reload())\n}\n","import { ChainId } from '@dcl/schemas'\nimport { AuthIdentity } from 'dcl-crypto'\n\nexport type LinkerResponseScenenDeploy = {\n responseType: 'scene-deploy'\n payload: {\n address: string\n signature: string\n chainId: ChainId\n }\n}\n\nexport type LinkerResponseIdentity = {\n responseType: 'identity'\n payload: {\n address: string\n chainId: ChainId\n identity: AuthIdentity\n }\n}\n\nexport type LinkerResponse = LinkerResponseScenenDeploy | LinkerResponseIdentity\n\nexport async function closeServer(\n ok: boolean,\n message: LinkerResponse\n): Promise<void> {\n await fetch(`/api/close?ok=${ok}&reason=${JSON.stringify(message)}`)\n}\n","import { call, put, takeLatest, takeEvery, select } from 'redux-saga/effects'\nimport { getConnectedProvider } from 'decentraland-dapps/dist/lib/eth'\nimport {\n getAddress,\n getChainId\n} from 'decentraland-dapps/dist/modules/wallet/selectors'\nimport { Web3Provider } from '@ethersproject/providers'\nimport { toUtf8Bytes } from '@ethersproject/strings'\nimport { ChainId } from '@dcl/schemas'\nimport { hexlify } from '@ethersproject/bytes'\n\nimport { closeServer } from '../server/utils'\nimport {\n SIGN_CONTENT_REQUEST,\n SIGN_CONTENT_SUCCESS,\n SignContentRequestAction,\n signContentSuccess,\n signContentFailure,\n SignContentSuccessAction,\n CREATE_IDENTITY_REQUEST,\n createIdentitySuccess,\n createIdentityFailure,\n CREATE_IDENTITY_SUCCESS,\n CreateIdentitySuccessAction\n} from './actions'\nimport { Provider } from 'decentraland-connect/dist'\nimport { AuthIdentity } from 'dcl-crypto'\nimport { createIdentity } from '@dcl/builder-client'\n\nexport function* signatureSaga() {\n yield takeLatest(SIGN_CONTENT_REQUEST, handleSignContentRequest)\n yield takeEvery(SIGN_CONTENT_SUCCESS, handleSignContentSuccess)\n\n yield takeLatest(CREATE_IDENTITY_REQUEST, handleCreateIdentityRequest)\n yield takeLatest(CREATE_IDENTITY_SUCCESS, handleCreateIdentitySuccess)\n}\n\nfunction* handleSignContentRequest(action: SignContentRequestAction) {\n try {\n const dataToSign = toUtf8Bytes(action.payload)\n\n const provider: Provider = yield call(() => getConnectedProvider())\n const web3provider = new Web3Provider(provider)\n const signer = web3provider.getSigner()\n\n const addr: string = yield call(() => signer.getAddress())\n\n const signedMessage: string = yield call(() =>\n provider.send('personal_sign', [hexlify(dataToSign), addr.toLowerCase()])\n )\n yield put(signContentSuccess(signedMessage))\n } catch (error) {\n yield put(signContentFailure((error as Error).message))\n }\n}\n\nfunction* handleSignContentSuccess(action: SignContentSuccessAction) {\n const address: string = yield select(getAddress)\n const chainId: ChainId = yield select(getChainId)\n const { signature } = action.payload\n\n try {\n yield call(() => {\n // tslint:disable-next-line: no-floating-promises\n closeServer(true, {\n responseType: 'scene-deploy',\n payload: { signature, address, chainId }\n })\n })\n } catch (error) {\n yield put(signContentFailure((error as Error).message))\n }\n}\n\nfunction* handleCreateIdentityRequest(_action: SignContentRequestAction) {\n try {\n const provider: Provider = yield call(() => getConnectedProvider())\n const web3provider = new Web3Provider(provider)\n const signer = web3provider.getSigner()\n const identity: AuthIdentity = yield () => createIdentity(signer, 1000)\n yield put(createIdentitySuccess(identity))\n } catch (error) {\n console.log({ error })\n yield put(createIdentityFailure((error as Error).message))\n }\n}\n\nfunction* handleCreateIdentitySuccess(action: CreateIdentitySuccessAction) {\n const { identity } = action.payload\n const address: string = yield select(getAddress)\n const chainId: ChainId = yield select(getChainId)\n\n try {\n yield call(() => {\n // tslint:disable-next-line: no-floating-promises\n closeServer(true, {\n responseType: 'identity',\n payload: { identity, address, chainId }\n })\n })\n } catch (error) {\n yield put(signContentFailure((error as Error).message))\n }\n}\n","import { call, put, takeEvery, select } from 'redux-saga/effects'\nimport { CONNECT_WALLET_SUCCESS } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors'\n\nimport { getLandContract, getEstateContract } from '../../contracts'\nimport { getConfig } from '../../config'\nimport { coordsToString } from '../land/utils'\nimport {\n FETCH_AUTHORIZATIONS_REQUEST,\n fetchAuthorizationsRequest,\n fetchAuthorizationsFailure,\n fetchAuthorizationsSuccess\n} from './actions'\nimport { Authorization } from './types'\nimport { Contract } from '@ethersproject/contracts'\n\nexport function* authorizationSaga() {\n yield takeEvery(CONNECT_WALLET_SUCCESS, handleConnectWalletSuccess)\n yield takeEvery(\n FETCH_AUTHORIZATIONS_REQUEST,\n handleFetchAuthorizationsRequest\n )\n}\n\nfunction* handleFetchAuthorizationsRequest() {\n const LANDRegistry: Contract = yield call(() => getLandContract())\n const EstateRegistry: Contract = yield call(() => getEstateContract())\n\n try {\n const address: string = yield select(getAddress)\n const assetIds = new Map<string, string>()\n\n const pAuthorizations: Promise<unknown>[] = []\n for (const parcel of getConfig('parcels')) {\n const { x, y } = parcel\n const pAuthorization = new Promise((resolve, reject) => {\n LANDRegistry['encodeTokenId'](x, y)\n .then((assetId: any) => {\n LANDRegistry['isUpdateAuthorized'](address, assetId)\n .then((isUpdateAuthorized: any) => {\n assetIds.set(coordsToString(parcel), assetId)\n resolve({ x, y, isUpdateAuthorized })\n })\n .catch(reject)\n })\n .catch(reject)\n })\n pAuthorizations.push(pAuthorization)\n }\n\n const parcelAuthorizations: Authorization[] = yield call(() =>\n Promise.all(pAuthorizations)\n )\n\n // If not authorized check permissions on estate\n const notAllowedAuthorizations = parcelAuthorizations.filter(\n a => !a.isUpdateAuthorized\n )\n const allowedAuthorizations = parcelAuthorizations.filter(\n a => a.isUpdateAuthorized\n )\n\n const pEstateAuthorizations: unknown[] = []\n for (const a of notAllowedAuthorizations) {\n const assetId = assetIds.get(coordsToString(a))\n const pAuthorization = new Promise((resolve, reject) => {\n EstateRegistry['getLandEstateId'](assetId)\n .then((estate: any) => {\n if (estate && estate > 0) {\n return EstateRegistry['isUpdateAuthorized'](address, estate).then(\n (isUpdateAuthorized: any) => {\n resolve({ ...a, isUpdateAuthorized })\n }\n )\n } else {\n return resolve(a) // If no estate leave authorization in false\n }\n })\n .catch(reject)\n })\n pEstateAuthorizations.push(pAuthorization)\n }\n\n const estateAuthorizations: Authorization[] = yield call(() =>\n Promise.all(pEstateAuthorizations)\n )\n\n const authorizations = [...allowedAuthorizations, ...estateAuthorizations]\n yield put(fetchAuthorizationsSuccess(authorizations))\n } catch (error) {\n yield put(fetchAuthorizationsFailure((error as Error).message))\n }\n}\n\nfunction* handleConnectWalletSuccess(): any {\n const address = yield call(() => getAddress)\n yield put(fetchAuthorizationsRequest(address))\n}\n","import { createSelector } from 'reselect'\nimport { RootState } from '../../types'\n\nexport const getState = (state: RootState) => state.signature\nexport const getData = createSelector(getState, state => state.data)\nexport const isLoading = createSelector(\n getState,\n state => state.loading.length > 0\n)\nexport const getError = createSelector(getState, state => state.error)\n","import React from 'react'\n\nexport default React.memo(({ children }: { children: string }) => (\n <p style={{ color: 'var(--primary)' }}> Error: {children}</p>\n))\n","import { Props } from './types'\nimport { Blockie, Address, Button } from 'decentraland-ui'\nimport { coordsToString } from '../../modules/land/utils'\nimport Error from '../Error'\n\nexport default function RenderWalletData({\n isConnected,\n isConnecting,\n wallet,\n authorizations,\n isUpdateAuthorized,\n onConnectWallet\n}: Props) {\n function getFormattedUnauthorized() {\n return (authorizations || [])\n .filter(a => !a.isUpdateAuthorized)\n .map(a => `\"${coordsToString(a)}\"`)\n .join(', ')\n }\n\n if (isConnected && wallet.address) {\n return (\n <>\n <p>\n Using address: &nbsp;\n <Blockie scale={3} seed={wallet.address}>\n <Address tooltip strong value={wallet.address} />\n </Blockie>\n </p>\n {authorizations?.length && !isUpdateAuthorized ? (\n <Error>\n {`You don't have permissions to update The following LANDs that are part of the scene: ${getFormattedUnauthorized()}`}\n </Error>\n ) : null}\n </>\n )\n }\n\n return (\n <>\n {isConnecting ? null : <p>Could not find any wallet</p>}\n <p>\n <Button\n primary\n onClick={onConnectWallet}\n loading={isConnecting}\n disabled={isConnecting}\n >\n Reconnect&nbsp;\n </Button>\n </p>\n </>\n )\n}\n","import { AnyAction, Dispatch } from 'redux'\nimport { connect } from 'react-redux'\nimport { ProviderType } from 'decentraland-connect'\nimport { enableWalletRequest } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport {\n getData as getWallet,\n isConnected,\n isConnecting\n} from 'decentraland-dapps/dist/modules/wallet/selectors'\n\nimport {\n getData as getSignature,\n isLoading as isSigningTx\n} from '../../modules/signature/selectors'\n\nimport { createIdentityRequest } from '../../modules/signature/actions'\nimport { RootState } from '../../types'\nimport { MapStateProps, MapDispatchProps } from './types'\n\nimport IdentityPage from './IdentityPage'\n\nconst mapState = (state: RootState): MapStateProps => {\n return {\n wallet: getWallet(state)!,\n isConnected: isConnected(state),\n isConnecting: isConnecting(state),\n signed: !!getSignature(state),\n isSigning: isSigningTx(state)\n }\n}\n\nconst mapDispatch = (dispatch: Dispatch<AnyAction>): MapDispatchProps => ({\n onConnectWallet: () => dispatch(enableWalletRequest(ProviderType.INJECTED)),\n onRequestIdentity: () => dispatch(createIdentityRequest())\n})\n\nexport default connect(mapState, mapDispatch)(IdentityPage)\n","import IdentityPage from './IdentityPage.container'\nexport default IdentityPage\n","import { SyntheticEvent } from 'react'\nimport './style.css'\nimport { Header, Button, Navbar } from 'decentraland-ui'\nimport { Props } from './types'\nimport RenderWalletData from '../RenderWalletData/RenderWalletData'\nimport { isRopsten } from '../../config'\n\nexport default function IdentityPage(props: Props) {\n const {\n isConnected,\n wallet,\n isConnecting,\n onConnectWallet,\n isSigning,\n onRequestIdentity\n } = props\n\n const handleSignature = (e: SyntheticEvent) => {\n e.preventDefault()\n onRequestIdentity()\n }\n\n return (\n <div className=\"LinkScenePage\">\n {isRopsten() && <div className=\"warning\">Using Ropsten test network</div>}\n <Navbar />\n <Header>Create an identity to sign deployments </Header>\n <RenderWalletData\n isUpdateAuthorized={true}\n isConnected={isConnected}\n isConnecting={isConnecting}\n wallet={wallet}\n onConnectWallet={onConnectWallet}\n />\n <form>\n <div>\n <Button\n primary\n onClick={handleSignature}\n disabled={!isConnected}\n loading={isSigning}\n >\n Sign ephemeral wallet\n </Button>\n </div>\n </form>\n </div>\n )\n}\n","import { createSelector } from 'reselect'\n\nimport { RootState } from '../../types'\n\nexport const getState = (state: RootState) => state.land\n\nexport const getData = createSelector(getState, state => state.data)\n\nexport const isLoading = createSelector(\n getState,\n state => state.loading.length > 0\n)\n\nexport const getError = createSelector(getState, state => state.error)\n","import { createSelector } from 'reselect'\n\nimport { RootState } from '../../types'\nimport { Authorization } from './types'\n\nexport const getState = (state: RootState) => state.authorization\n\nexport const getData = createSelector(getState, state => state.data)\n\nexport const isLoading = createSelector(\n getState,\n state => state.loading.length > 0\n)\n\nexport const getError = createSelector(getState, state => state.error)\n\nexport const isUpdateAuthorized = createSelector(getData, authorizations => {\n if (!authorizations?.length) {\n return\n }\n\n return authorizations.every((a: Authorization) => a.isUpdateAuthorized)\n})\n","import { getConfig } from '../../config'\nimport { Props } from './types'\n\nexport default function LandInfo({ deployUrl, base }: Props) {\n const name = base.name ?? 'LAND without name'\n\n const { x, y } = getConfig('baseParcel')\n\n return (\n <p>\n Updating <b>{name}</b>{' '}\n <a href={deployUrl} target=\"_blank\" rel=\"noreferrer\">\n at coordinates {x}, {y}\n </a>\n </p>\n )\n}\n","import { AnyAction, Dispatch } from 'redux'\nimport { connect } from 'react-redux'\nimport { ProviderType } from 'decentraland-connect'\nimport { enableWalletRequest } from 'decentraland-dapps/dist/modules/wallet/actions'\nimport {\n getData as getWallet,\n isConnected,\n isConnecting\n} from 'decentraland-dapps/dist/modules/wallet/selectors'\n\nimport {\n isLoading as isLandLoading,\n getData as getLand,\n getError as getLandError\n} from '../../modules/land/selectors'\nimport {\n getData as getSignature,\n isLoading as isSigningTx\n} from '../../modules/signature/selectors'\nimport {\n getData as getAuthorizations,\n isUpdateAuthorized,\n isLoading as isAuthorizationLoading\n} from '../../modules/authorization/selectors'\nimport { signContentRequest } from '../../modules/signature/actions'\nimport { RootState } from '../../types'\nimport { MapStateProps, MapDispatchProps } from './types'\n\nimport LinkerPage from './LinkerPage'\n\nconst mapState = (state: RootState): MapStateProps => {\n return {\n base: getLand(state),\n wallet: getWallet(state)!,\n isLandLoading: isLandLoading(state),\n isConnected: isConnected(state),\n isConnecting: isConnecting(state),\n error: getLandError(state)!,\n signed: !!getSignature(state),\n isUpdateAuthorized: isUpdateAuthorized(state),\n authorizations: getAuthorizations(state),\n isAuthorizationLoading: isAuthorizationLoading(state),\n isSigning: isSigningTx(state)\n }\n}\n\nconst mapDispatch = (dispatch: Dispatch<AnyAction>): MapDispatchProps => ({\n onConnectWallet: () => dispatch(enableWalletRequest(ProviderType.INJECTED)),\n onSignContent: (cid: string) => dispatch(signContentRequest(cid))\n})\n\nexport default connect(mapState, mapDispatch)(LinkerPage)\n","import LinkerPage from './LinkerPage.container'\nexport default LinkerPage\n","import { SyntheticEvent } from 'react'\nimport './style.css'\nimport { Header, Button, Navbar } from 'decentraland-ui'\nimport { ChainId } from '@dcl/schemas'\nimport { getConfig, isDevelopment } from '../../config'\nimport Error from '../Error'\nimport { Props } from './types'\nimport LandInfo from '../LandInfo/LandInfo'\nimport RenderWalletData from '../RenderWalletData/RenderWalletData'\n\nexport default function LinkScenePage(props: Props) {\n const {\n isConnected,\n wallet,\n authorizations,\n isUpdateAuthorized,\n isConnecting,\n onConnectWallet,\n isSigning,\n base,\n error,\n isAuthorizationLoading,\n signed\n } = props\n\n const handleSignature = (e: SyntheticEvent) => {\n e.preventDefault()\n const { onSignContent } = props\n onSignContent(getConfig('rootCID'))\n }\n\n const { x, y } = getConfig('baseParcel')\n const rootCID = getConfig('rootCID')\n const isRopsten = wallet?.chainId === ChainId.ETHEREUM_ROPSTEN\n const networkName = isRopsten ? 'zone' : 'org'\n const deployUrl = `https://play.decentraland.${networkName}/?position=${x},${y}`\n\n return (\n <div className=\"LinkScenePage\">\n {isRopsten && <div className=\"warning\">Using Ropsten test network</div>}\n <Navbar />\n <Header>Update LAND data</Header>\n <RenderWalletData\n authorizations={authorizations}\n isUpdateAuthorized={isUpdateAuthorized}\n isConnected={isConnected}\n isConnecting={isConnecting}\n wallet={wallet}\n onConnectWallet={onConnectWallet}\n />\n <div>\n <img\n style={{ maxWidth: '100%', maxHeight: '100%', width: '35%' }}\n className=\"map\"\n src={`https://api.decentraland.${networkName}/v1/parcels/${x}/${y}/map.png`}\n alt={`Base parcel ${x},${y}`}\n />\n </div>\n <LandInfo deployUrl={deployUrl} base={base} />\n <p>\n Project CID: <b>{rootCID}</b>\n </p>\n {isConnected && signed && (\n <p>\n Content was succesfully signed and it's being uploaded{' '}\n <a href={deployUrl} target=\"_blank\" rel=\"noreferrer\">\n here\n </a>\n . You can close this page and check the CLI for more info.\n </p>\n )}\n <form>\n <div>\n <Button\n primary\n onClick={handleSignature}\n disabled={\n !isConnected ||\n !!error ||\n isAuthorizationLoading ||\n !isUpdateAuthorized\n }\n loading={isSigning}\n >\n Sign and Deploy\n </Button>\n </div>\n </form>\n {error ? (\n isDevelopment() ? (\n <Error>{error}</Error>\n ) : (\n <Error>There was an unexpected error.</Error>\n )\n ) : null}\n </div>\n )\n}\n","import IdentityPage from './IdentityPage'\nimport LinkerPage from './LinkerPage'\n\n// TODO: implement a router\nconst Root = (props: any) => {\n const qs = new URLSearchParams(document.location.search)\n\n if (qs.has('wearableId')) {\n return <IdentityPage {...props} />\n }\n\n return <LinkerPage {...props} />\n}\n\nexport default Root\n","import ReactDOM from 'react-dom'\nimport WalletProvider from 'decentraland-dapps/dist/providers/WalletProvider'\nimport { Provider } from 'react-redux'\n\nimport { initStore } from './store'\n\nimport 'decentraland-ui/lib/styles.css'\nimport 'decentraland-ui/lib/dark-theme.css'\nimport Root from './components/Root'\n\n// tslint:disable-next-line: no-floating-promises\nReactDOM.render(\n <Provider store={initStore()}>\n <WalletProvider>\n <Root />\n </WalletProvider>\n </Provider>,\n document.getElementById('root')\n)\n","import { applyMiddleware, compose, createStore } from 'redux'\nimport createSagasMiddleware from 'redux-saga'\nimport { createLogger } from 'redux-logger'\nimport { createTransactionMiddleware } from 'decentraland-dapps/dist/modules/transaction/middleware'\nimport { createStorageMiddleware } from 'decentraland-dapps/dist/modules/storage/middleware'\n\nimport { init as initConfig } from './config'\nimport { rootReducer } from './reducer'\nimport { rootSaga } from './sagas'\n\nexport function initStore() {\n initConfig()\n const composeEnhancers =\n (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose\n\n const { storageMiddleware, loadStorageMiddleware } = createStorageMiddleware({\n storageKey: 'decentraland-linker'\n })\n const sagasMiddleware = createSagasMiddleware()\n const transactionMiddleware = createTransactionMiddleware()\n const loggerMiddleware = createLogger({\n collapsed: () => true,\n predicate: (_, _action) => false // isDevelopment() || action.type.includes('Failure')\n })\n\n const middleware = applyMiddleware(\n sagasMiddleware,\n loggerMiddleware,\n storageMiddleware,\n transactionMiddleware\n )\n\n const enhancer = composeEnhancers(middleware)\n const store = createStore(rootReducer, enhancer)\n\n sagasMiddleware.run(rootSaga())\n loadStorageMiddleware(store)\n\n return store\n}\n","import { all } from 'redux-saga/effects'\n\nimport { landSaga } from './modules/land/sagas'\nimport { walletSaga } from './modules/wallet/sagas'\nimport { signatureSaga } from './modules/signature/sagas'\nimport { authorizationSaga } from './modules/authorization/sagas'\n\nexport function rootSaga() {\n return function*() {\n yield all([walletSaga(), landSaga(), signatureSaga(), authorizationSaga()])\n }\n}\n"],"sourceRoot":""}