I hereby claim:
- I am irzhywau on github.
- I am irzhy (https://keybase.io/irzhy) on keybase.
- I have a public key ASDIWYDt8qwr77P6AfGveU0kR2IQTiUymnu8aGoFNIRtqwo
To claim this, I am signing this object:
| const litAction0 = async () => { | |
| console.log('Decrypting CEK...', { kid, ciphertext, dataToEncryptHash, publicKey }); | |
| // 1. Decrypt the CEK using Lit's access control | |
| const cek = await Lit.Actions.decryptAndCombine({ | |
| accessControlConditions: [ | |
| { | |
| conditionType: "evmContract", | |
| chain: "arbitrumSepolia", | |
| contractAddress: "0x4Ba1151B5bc5B39500ff8D3B277eC6d217cB33ee", | |
| functionName: "hasAccessByContentId", |
| // KID and CEK are parameters | |
| const { ciphertext, dataToEncryptHash, ...rest } = await lit.encrypt({ | |
| unifiedAccessControlConditions: [ | |
| { | |
| conditionType: "evmContract", | |
| chain: 'arbitrumSepolia', | |
| contractAddress: '0x4Ba1151B5bc5B39500ff8D3B277eC6d217cB33ee', | |
| functionName: 'hasAccessByContentId', | |
| functionParams: [':userAddress', KID], | |
| functionAbi: { |
| const { Logger, VerifiablePresentation, JWTHeader, JWTParserBuilder, Issuer, DIDURL } = require('@elastosfoundation/did-js-sdk') | |
| const { AppContext, Vault, HiveException } = require('@elastosfoundation/hive-js-sdk') | |
| const didConfig = require("../../config/elastos.did"); | |
| const hiveConfig = require("../../config/elastos.hive"); | |
| const { AppDID, UserDID } = require("./entities"); | |
| class ElacityHiveContext { | |
| constructor(subFolder = null) { | |
| this.localDataDir = `${didConfig.FOLDER.METADATA}/${(didConfig.APP.DID).split(':').pop()}` + (subFolder ? `/${subFolder}` : ''); |
| // SPDX-License-Identifier: MIT | |
| pragma solidity >=0.6.12; | |
| import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| import "./IERC20Wrappable.sol"; | |
| contract ERC20WrappableSupport { | |
| modifier withWrap(address payable wToken) { |
| // we are in an create-react-app context | |
| export default () => { | |
| const [mm, setSupport] = React.useState<MetamaskSupport | null>(null); | |
| React.useEffect(() => { | |
| let alreadyHandled = false; | |
| // as the provider may be not available all the time on mobile, we need this side-effect implementation | |
| // see https://docs.metamask.io/guide/mobile-best-practices.html#the-provider-window-ethereum | |
| // also see https://github.com/MetaMask/detect-provider |
I hereby claim:
To claim this, I am signing this object:
| parallelLimit(_map(offsets, o => (callback: Function) => { | |
| if (cancelRequest) { | |
| callback(new Error(`Request canceled by client`), null); | |
| } | |
| // we implemented retry pattern which focus on RateLimitError only | |
| retry({ | |
| times: retries | |
| , interval: function (retryCount) { | |
| console.log(`retry... #${retryCount}, last client: ${podio.clientId}`); |
| // inside the formatter method | |
| parallel(_map(item.fields, (field: any) => { | |
| return (callback: Function) => { | |
| let value: any = null; | |
| switch (field.type) { | |
| case 'category': | |
| value = _map(field.values, (val: any) => { return { id: val.value.id, text: val.value.text } }); | |
| break; | |
| case 'image': |
| render() { | |
| //change to let | |
| let {columns, fields, cache, element_id} = this.props; | |
| let {data, pages, loading, error} = this.state; | |
| // get user session, unique for each browser | |
| let sessionId = getPHPSessId(); | |
| const Error = ({error}) => ( | |
| <span style={{fontSize: "120%", color:"#ff0000", width:"100%", textAlign:"center", display:"inline-block"}}>Oops!! {error}</span> |
| <?php | |
| // this piece is wrapped in a method of the class in charge of handling data to / from cache | |
| $this->bootCollection(); | |
| $dataset = $this->fetch($this->appViewStoragePath."{$app_id}-{$this->table->key}.json", true); | |
| // --- Filter data (settings-based filters) | |
| $dataset = $this->applyFilterAndSearch($dataset, $this->searchFilter); | |
| // --- Filter data (user filters) |