diff --git a/externs.js b/externs.js index d045b466ee..de91fe9ed5 100644 --- a/externs.js +++ b/externs.js @@ -1,577 +1,591 @@ var TopLevel = { - "abs" : function () {}, - "ActionSheetIOS" : function () {}, - "add" : function () {}, - "addEventListener" : function () {}, - "addListener" : function () {}, - "addPeer" : function () {}, - "addSymKey" : function () {}, - "addTier2Support" : function () {}, - "Alert" : function () {}, - "alert" : function () {}, - "all" : function () {}, - "Android" : function () {}, - "android" : function () {}, - "Animated" : function () {}, - "append" : function () {}, - "appStateChange" : function () {}, - "args" : function () {}, - "argv" : function () {}, - "Array" : function () {}, - "array" : function () {}, - "AsyncStorage" : function () {}, - "at" : function () {}, - "back" : function () {}, - "BACK" : function () {}, - "BackHandler" : function () {}, - "balanceOf" : function () {}, - "bezier" : function () {}, - "BigNumber" : function () {}, - "blur" : function () {}, - "button" : function () {}, - "bytesToHex" : function () {}, - "call" : function () {}, - "callPrivateRPC" : function () {}, - "callRPC" : function () {}, - "canImplyAuthentication" : function () {}, - "catch" : function () {}, - "Chance" : function () {}, - "changePin" : function () {}, - "Channel" : function () {}, - "chaosModeUpdate" : function () {}, - "charCodeAt" : function () {}, - "checkAddressChecksum" : function () {}, - "checkVideoAuthorizationStatus" : function () {}, - "clear" : function () {}, - "clearCookies" : function () {}, - "clearInterval" : function () {}, - "clearStorageAPIs" : function () {}, - "clearTimeout" : function () {}, - "Clipboard" : function () {}, - "close" : function () {}, - "closeApplication" : function () {}, - "code" : function () {}, - "concat" : function () {}, - "confirmMessagesProcessed" : function () {}, - "confirmMessagesProcessedByID" : function () {}, - "connectionChange" : function () {}, - "console" : function () {}, - "ContactRequest" : function () {}, - "ContactRequestConfirmed" : function () {}, - "ContactRequestConfirmedHandler" : function () {}, - "ContactRequestHandler" : function () {}, - "ContactUpdate" : function () {}, - "ContactUpdateHandler" : function () {}, - "contentOffset" : function () {}, - "contentSize" : function () {}, - "contract" : function () {}, - "createAccount" : function () {}, - "createBatch" : function () {}, - "createChannel" : function () {}, - "cubic" : function () {}, - "CURRENCY" : function () {}, - "data" : function () {}, - "Date" : function () {}, - "DateTimeFormat" : function () {}, - "DEBUG" : function () {}, - "decay" : function () {}, - "DECIMAL_SEP" : function () {}, - "GROUP_SEP" : function () {}, - "PERCENT" : function () {}, - "ZERO_DIGIT" : function () {}, - "PLUS_SIGN" : function () {}, - "MINUS_SIGN" : function () {}, - "EXP_SYMBOL" : function () {}, - "PERMILL" : function () {}, - "INFINITY" : function () {}, - "NAN" : function () {}, - "DECIMAL_PATTERN" : function () {}, - "SCIENTIFIC_PATTERN" : function () {}, - "PERCENT_PATTERN" : function () {}, - "CURRENCY_PATTERN" : function () {}, - "DEF_CURRENCY_CODE" : function () {}, - "decimals" : function () {}, - "decodeURI" : function () {}, - "default" : function () {}, - "defaultAccount" : function () {}, - "defaultSeparator" : function () {}, - "delay" : function () {}, - "DesktopNotification" : function () {}, - "DeviceEventEmitter" : function () {}, - "Dimensions" : function () {}, - "dispatch" : function () {}, - "displayNotification" : function () {}, - "dividedBy" : function () {}, - "DocumentDirectoryPath" : function () {}, - "dx" : function () {}, - "dy" : function () {}, - "ease" : function () {}, - "Easing" : function () {}, - "enableVibration" : function () {}, - "encode" : function () {}, - "encodeURIComponent" : function () {}, - "encryptionKey" : function () {}, - "end" : function () {}, - "endCoordinates" : function () {}, - "entries" : function () {}, - "eq" : function () {}, - "Error" : function () {}, - "error" : function () {}, - "ErrorUtils" : function () {}, - "estimateGas" : function () {}, - "eth" : function () {}, - "event" : function () {}, - "EventEmmiter" : function () {}, - "exec" : function () {}, - "execute" : function () {}, - "exists" : function () {}, - "extPost" : function () {}, - "extractGroupMembershipSignatures" : function () {}, - "identicon": function() {}, - "generateAlias": function() {}, - "fallbacks" : function () {}, - "fetch" : function () {}, - "firebase" : function () {}, - "floor" : function () {}, - "focus" : function () {}, - "format" : function () {}, - "FormData" : function () {}, - "from" : function () {}, - "fromCharCode" : function () {}, - "fromWei" : function () {}, - "generateAndLoadKey" : function () {}, - "generateMnemonic" : function () {}, - "generateSymKeyFromPassword" : function () {}, - "get" : function () {}, - "getApplicationInfo" : function () {}, - "getBalance" : function () {}, - "getBlock" : function () {}, - "getBlockNumber" : function () {}, - "getConnectionInfo" : function () {}, - "getDomain" : function () {}, - "getGasPrice" : function () {}, - "getGenericPassword" : function () {}, - "getGlobalHandler" : function () {}, - "getInitialNotification" : function () {}, - "getInitialURL" : function () {}, - "getInternetCredentials" : function () {}, - "getItem" : function () {}, - "getKeys" : function () {}, - "getLayout" : function () {}, - "getNetwork" : function () {}, - "getNode" : function () {}, - "getNodesFromContract" : function () {}, - "getPublicKey" : function () {}, - "getSecurityLevel" : function () {}, - "getStateForAction" : function () {}, - "getString" : function () {}, - "getSymKey" : function () {}, - "getSyncing" : function () {}, - "getTimezoneOffset" : function () {}, - "getToken" : function () {}, - "getTransactionReceipt" : function () {}, - "getValue" : function () {}, - "goog" : function () {}, - "greaterThanOrEqualTo" : function () {}, - "GroupMembershipUpdate" : function () {}, - "GroupMembershipUpdateHandler" : function () {}, - "guid" : function () {}, - "hashMessage" : function () {}, - "hashTransaction" : function () {}, - "hashTypedData" : function () {}, - "headers" : function () {}, - "height" : function () {}, - "hexToNumber" : function () {}, - "hexToNumberString" : function () {}, - "hexToUtf8" : function () {}, - "utf8ToHex" : function () {}, - "hide" : function () {}, - "i18n" : function () {}, - "ignoreWarnings" : function () {}, - "in" : function () {}, - "index" : function () {}, - "indexOf" : function () {}, - "init" : function () {}, - "initKeystore" : function () {}, - "injectJavaScript" : function () {}, - "installApplet" : function () {}, - "installAppletAndInitCard" : function () {}, - "Int8Array" : function () {}, - "integer" : function () {}, - "interpolate" : function () {}, - "is24Hour" : function () {}, - "isAddress" : function () {}, - "isConnected" : function () {}, - "isConnectionExpensive" : function () {}, - "isDeviceRooted" : function () {}, - "isFocused" : function () {}, - "isLinux" : function () {}, - "isMacOs" : function () {}, - "isMatches" : function () {}, - "isNaN" : function () {}, - "isUnix" : function () {}, - "isWin" : function () {}, - "isZero" : function () {}, - "Item" : function () {}, - "item" : function () {}, - "JSON" : function () {}, - "jsonEvent" : function () {}, - "keccak512" : function () {}, - "Keyboard" : function () {}, - "language" : function () {}, - "layout" : function () {}, - "layoutMeasurement" : function () {}, - "leftPad" : function () {}, - "length" : function () {}, - "LibraryDirectoryPath" : function () {}, - "Linking" : function () {}, - "locale" : function () {}, - "log" : function () {}, - "login" : function () {}, - "loginWithKeycard" : function () {}, - "logout" : function () {}, - "loop" : function () {}, - "lt" : function () {}, - "mail" : function () {}, - "map" : function () {}, - "map->GroupMembershipUpdate" : function () {}, - "MapEntry" : function () {}, - "markTrustedPeer" : function () {}, - "MaskedData" : function () {}, - "Math" : function () {}, - "Message" : function () {}, - "message" : function () {}, - "MessageHandler" : function () {}, - "MessagesSeen" : function () {}, - "MessagesSeenHandler" : function () {}, - "messaging" : function () {}, - "method" : function () {}, - "minus" : function () {}, - "plus" : function () {}, - "mkdir" : function () {}, - "module" : function () {}, - "moveFile" : function () {}, - "Multihash" : function () {}, - "name" : function () {}, - "nativeEvent" : function () {}, - "NativeEventEmitter" : function () {}, - "NativeModules" : function () {}, - "navigate" : function () {}, - "navigation" : function () {}, - "NavigationActions" : function () {}, - "NavigationEvents" : function () {}, - "newKeyPair" : function () {}, - "newMessageFilter" : function () {}, - "newRawMessageFilter": function() {}, - "newSymKey" : function () {}, - "nfcIsEnabled" : function () {}, - "nfcIsSupported" : function () {}, - "Notification" : function () {}, - "notification" : function () {}, - "notifications" : function () {}, - "now" : function () {}, - "Number" : function () {}, - "NumberFormatSymbols" : function () {}, - "NumberFormatSymbols_af" : function () {}, - "NumberFormatSymbols_am" : function () {}, - "NumberFormatSymbols_ar" : function () {}, - "NumberFormatSymbols_ar_DZ" : function () {}, - "NumberFormatSymbols_az" : function () {}, - "NumberFormatSymbols_be" : function () {}, - "NumberFormatSymbols_bg" : function () {}, - "NumberFormatSymbols_bn" : function () {}, - "NumberFormatSymbols_br" : function () {}, - "NumberFormatSymbols_bs" : function () {}, - "NumberFormatSymbols_cs" : function () {}, - "NumberFormatSymbols_cy" : function () {}, - "NumberFormatSymbols_da" : function () {}, - "NumberFormatSymbols_de_CH" : function () {}, - "NumberFormatSymbols_en" : function () {}, - "NumberFormatSymbols_en_AU" : function () {}, - "NumberFormatSymbols_en_CA" : function () {}, - "NumberFormatSymbols_en_IN" : function () {}, - "NumberFormatSymbols_en_SG" : function () {}, - "NumberFormatSymbols_es_419" : function () {}, - "NumberFormatSymbols_fa" : function () {}, - "NumberFormatSymbols_fil" : function () {}, - "NumberFormatSymbols_he" : function () {}, - "NumberFormatSymbols_hr" : function () {}, - "NumberFormatSymbols_hu" : function () {}, - "NumberFormatSymbols_hy" : function () {}, - "NumberFormatSymbols_id" : function () {}, - "NumberFormatSymbols_is" : function () {}, - "NumberFormatSymbols_ja" : function () {}, - "NumberFormatSymbols_ka" : function () {}, - "NumberFormatSymbols_kk" : function () {}, - "NumberFormatSymbols_km" : function () {}, - "NumberFormatSymbols_ko" : function () {}, - "NumberFormatSymbols_ky" : function () {}, - "NumberFormatSymbols_ln" : function () {}, - "NumberFormatSymbols_lo" : function () {}, - "NumberFormatSymbols_mk" : function () {}, - "NumberFormatSymbols_mn" : function () {}, - "NumberFormatSymbols_mo" : function () {}, - "NumberFormatSymbols_ms" : function () {}, - "NumberFormatSymbols_my" : function () {}, - "NumberFormatSymbols_nb" : function () {}, - "NumberFormatSymbols_ne" : function () {}, - "NumberFormatSymbols_pl" : function () {}, - "NumberFormatSymbols_pt" : function () {}, - "NumberFormatSymbols_ro" : function () {}, - "NumberFormatSymbols_ru" : function () {}, - "NumberFormatSymbols_sh" : function () {}, - "NumberFormatSymbols_si" : function () {}, - "NumberFormatSymbols_sq" : function () {}, - "NumberFormatSymbols_sv" : function () {}, - "NumberFormatSymbols_sw" : function () {}, - "NumberFormatSymbols_th" : function () {}, - "NumberFormatSymbols_tr" : function () {}, - "NumberFormatSymbols_uk" : function () {}, - "NumberFormatSymbols_ur" : function () {}, - "NumberFormatSymbols_uz" : function () {}, - "NumberFormatSymbols_vi" : function () {}, - "NumberFormatSymbols_zh" : function () {}, - "NumberFormatSymbols_zh_HK" : function () {}, - "NumberFormatSymbols_zh_TW" : function () {}, - "numberToHex" : function () {}, - "ok" : function () {}, - "onMessage" : function () {}, - "onNotification" : function () {}, - "onNotificationOpened" : function () {}, - "onTokenRefresh" : function () {}, - "openAccounts" : function () {}, - "openNfcSettings" : function () {}, - "openPicker" : function () {}, - "openURL" : function () {}, - "OS" : function () {}, - "out" : function () {}, - "p" : function () {}, - "pageY" : function () {}, - "pair" : function () {}, - "PairInstallation" : function () {}, - "PairInstallationHandler" : function () {}, - "panHandlers" : function () {}, - "PanResponder" : function () {}, - "parallel" : function () {}, - "parse" : function () {}, - "parseFloat" : function () {}, - "parseInt" : function () {}, - "password" : function () {}, - "path" : function () {}, - "payload" : function () {}, - "PermissionsAndroid" : function () {}, - "PersistentPriorityMap" : function () {}, - "PersonalRequestCommand" : function () {}, - "PersonalSendCommand" : function () {}, - "Platform" : function () {}, - "pow" : function () {}, - "Priority" : function () {}, - "Category" : function () {}, - "High" : function () {}, - "Importance" : function () {}, - "prepareDirAndUpdateConfig" : function () {}, - "Promise" : function () {}, - "props" : function () {}, - "prototype" : function () {}, - "push" : function () {}, - "quad" : function () {}, - "ReactNative" : function () {}, - "readDir" : function () {}, - "readFile" : function () {}, - "recoverAccount" : function () {}, - "reduce" : function () {}, - "register" : function () {}, - "registerComponent" : function () {}, - "registerHeadlessTask" : function () {}, - "reject" : function () {}, - "reload" : function () {}, - "remove" : function () {}, - "removeAllListeners" : function () {}, - "removeEventListener" : function () {}, - "removeKey" : function () {}, - "removeKeyWithUnpair" : function () {}, - "removeListener" : function () {}, - "repeat" : function () {}, - "request" : function () {}, - "requestMessages" : function () {}, - "requestMultiple" : function () {}, - "requestPermission" : function () {}, - "require" : function () {}, - "reset" : function () {}, - "resetGenericPassword" : function () {}, - "resetInternetCredentials" : function () {}, - "resolve" : function () {}, - "respond" : function () {}, - "rightPad" : function () {}, - "round" : function () {}, - "routeName" : function () {}, - "router" : function () {}, - "routes" : function () {}, - "saveAccountAndLogin" : function () {}, - "saveAccountAndLoginWithKeycard" : function () {}, - "schemaVersion" : function () {}, - "scrollTo" : function () {}, - "scrollToEnd" : function () {}, - "scrollToIndex" : function () {}, - "section" : function () {}, - "selection" : function () {}, - "sendDataNotification" : function () {}, - "sendDirectMessage" : function () {}, - "sendLogs" : function () {}, - "sendPairingMessage" : function () {}, - "sendPublicMessage" : function () {}, - "sendToBridge" : function () {}, - "sendTransaction" : function () {}, - "sendTransactionWithSignature" : function () {}, - "separators" : function () {}, - "sequence" : function () {}, - "set" : function () {}, - "setAutoCancel" : function () {}, - "setBackgroundColor" : function () {}, - "setBarStyle" : function () {}, - "setBlankPreviewFlag" : function () {}, - "setCategory" : function () {}, - "setChannelId" : function () {}, - "setCurrentDapp" : function () {}, - "setDockBadgeLabel" : function () {}, - "setGenericPassword" : function () {}, - "setGlobalHandler" : function () {}, - "setGroup" : function () {}, - "setHidden" : function () {}, - "setInternetCredentials" : function () {}, - "setInterval" : function () {}, - "setItem" : function () {}, - "setNativeProps" : function () {}, - "setNetworkActivityIndicatorVisible" : function () {}, - "setPriority" : function () {}, - "setShowBadge" : function () {}, - "setSmallIcon" : function () {}, - "setSoftInputMode" : function () {}, - "setSound" : function () {}, - "setString" : function () {}, - "setTimeout" : function () {}, - "setTranslucent" : function () {}, - "setUsername" : function () {}, - "setValue" : function () {}, - "sha3" : function () {}, - "Share" : function () {}, - "share" : function () {}, - "shh" : function () {}, - "show" : function () {}, - "showActionSheetWithOptions" : function () {}, - "showPicker" : function () {}, - "sign" : function () {}, - "signGroupMembership" : function () {}, - "signMessage" : function () {}, - "signTypedData" : function () {}, - "slice" : function () {}, - "SplashScreen" : function () {}, - "spring" : function () {}, - "stack" : function () {}, - "StackActions" : function () {}, - "start" : function () {}, - "startNode" : function () {}, - "state" : function () {}, - "Status" : function () {}, - "status" : function () {}, - "statusText" : function () {}, - "stop" : function () {}, - "stopAnimation" : function () {}, - "stopNode" : function () {}, - "stopWatching" : function () {}, - "stream" : function () {}, - "String" : function () {}, - "stringify" : function () {}, - "subscribe" : function () {}, - "substr" : function () {}, - "symbol" : function () {}, - "SyncInstallation" : function () {}, - "SyncInstallationHandler" : function () {}, - "t" : function () {}, - "takePictureAsync" : function () {}, - "Text" : function () {}, - "text" : function () {}, - "TextEncoder" : function () {}, - "then" : function () {}, - "times" : function () {}, - "timestamp" : function () {}, - "timing" : function () {}, - "title" : function () {}, - "toAscii" : function () {}, - "toChecksumAddress" : function () {}, - "toFixed" : function () {}, - "toHex" : function () {}, - "toLocaleString" : function () {}, - "toNumber" : function () {}, - "torchMode" : function () {}, - "toString" : function () {}, - "totalSupply" : function () {}, - "toTwosComplement" : function () {}, - "toUtf8" : function () {}, - "toWei" : function () {}, - "translations" : function () {}, - "Uint8Array" : function () {}, - "unblockPin" : function () {}, - "unlink" : function () {}, - "unpair" : function () {}, - "unpairAndDelete" : function () {}, - "updateMailservers" : function () {}, - "Uri" : function () {}, - "url" : function () {}, - "Value" : function () {}, - "value" : function () {}, - "verify" : function () {}, - "verifyPin" : function () {}, - "Version" : function () {}, - "version" : function () {}, - "vibrate" : function () {}, - "View" : function () {}, - "FlatList" : function () {}, - "warn" : function () {}, - "WebView" : function () {}, - "WebViewBridgeModule" : function () {}, - "width" : function () {}, - "window" : function () {}, - "writeCopyTo" : function () {}, - "x" : function () {}, - "y" : function () {}, - "YellowBox" : function () {}, - "UtcDateTime": function () {}, - "fromTimestamp": function () {}, - "ERAS": function () {}, - "ERANAMES": function () {}, - "NARROWMONTHS": function () {}, - "STANDALONENARROWMONTHS": function () {}, - "MONTHS": function () {}, - "STANDALONEMONTHS": function () {}, - "SHORTMONTHS": function () {}, - "STANDALONESHORTMONTHS": function () {}, - "WEEKDAYS": function () {}, - "STANDALONEWEEKDAYS": function () {}, - "SHORTWEEKDAYS": function () {}, - "STANDALONESHORTWEEKDAYS": function () {}, - "NARROWWEEKDAYS": function () {}, - "STANDALONENARROWWEEKDAYS": function () {}, - "SHORTQUARTERS": function () {}, - "QUARTERS": function () {}, - "AMPMS": function () {}, - "DATEFORMATS": function () {}, - "TIMEFORMATS": function () {}, - "DATETIMEFORMATS": function () {}, - "FIRSTDAYOFWEEK": function () {}, - "WEEKENDRANGE": function () {}, - "FIRSTWEEKCUTOFFDAY": function () {}, - "decimalPlaces": function () {}, - "_android": function () {}, - "isSupported" : function () {}, - "authenticate" : function () {}, - "createAppContainer" : function () {}, - "useScreens" : function () {}, - "multiAccountGenerateAndDeriveAddresses" : function () {}, - "multiAccountStoreDerived" : function () {}, - "multiAccountDeriveAddresses" : function () {}, - "multiAccountReset" : function () {}, - "multiAccountLoadAccount" : function () {}, - "multiAccountStoreAccount" : function () {}, - "multiAccountImportMnemonic" : function () {} + "abs" : function () {}, + "ActionSheetIOS" : function () {}, + "add" : function () {}, + "addEventListener" : function () {}, + "addListener" : function () {}, + "addPeer" : function () {}, + "addSymKey" : function () {}, + "addTier2Support" : function () {}, + "Alert" : function () {}, + "alert" : function () {}, + "all" : function () {}, + "Android" : function () {}, + "android" : function () {}, + "Animated" : function () {}, + "append" : function () {}, + "appStateChange" : function () {}, + "args" : function () {}, + "argv" : function () {}, + "Array" : function () {}, + "array" : function () {}, + "AsyncStorage" : function () {}, + "at" : function () {}, + "back" : function () {}, + "BACK" : function () {}, + "BackHandler" : function () {}, + "balanceOf" : function () {}, + "bezier" : function () {}, + "BigNumber" : function () {}, + "blur" : function () {}, + "button" : function () {}, + "bytesToHex" : function () {}, + "call" : function () {}, + "callPrivateRPC" : function () {}, + "callRPC" : function () {}, + "canImplyAuthentication" : function () {}, + "catch" : function () {}, + "Chance" : function () {}, + "changePin" : function () {}, + "Channel" : function () {}, + "chaosModeUpdate" : function () {}, + "charCodeAt" : function () {}, + "checkAddressChecksum" : function () {}, + "checkVideoAuthorizationStatus" : function () {}, + "author": function() {}, + "encryptionId": function() {}, + "chat": function() {}, + "messageId": function() {}, + "clear" : function () {}, + "clearCookies" : function () {}, + "clearInterval" : function () {}, + "clearStorageAPIs" : function () {}, + "clearTimeout" : function () {}, + "Clipboard" : function () {}, + "close" : function () {}, + "closeApplication" : function () {}, + "code" : function () {}, + "concat" : function () {}, + "confirmMessagesProcessed" : function () {}, + "messages": function() {}, + "discovery": function() {}, + "negotiated": function() {}, + "chatId": function() {}, + "confirmMessagesProcessedByID" : function () {}, + "connectionChange" : function () {}, + "console" : function () {}, + "ContactRequest" : function () {}, + "ContactRequestConfirmed" : function () {}, + "ContactRequestConfirmedHandler" : function () {}, + "ContactRequestHandler" : function () {}, + "ContactUpdate" : function () {}, + "ContactUpdateHandler" : function () {}, + "contentOffset" : function () {}, + "contentSize" : function () {}, + "contract" : function () {}, + "createAccount" : function () {}, + "createBatch" : function () {}, + "createChannel" : function () {}, + "cubic" : function () {}, + "CURRENCY" : function () {}, + "data" : function () {}, + "Date" : function () {}, + "DateTimeFormat" : function () {}, + "DEBUG" : function () {}, + "decay" : function () {}, + + "dedupId": function() {}, + "DECIMAL_SEP" : function () {}, + "GROUP_SEP" : function () {}, + "PERCENT" : function () {}, + "ZERO_DIGIT" : function () {}, + "PLUS_SIGN" : function () {}, + "MINUS_SIGN" : function () {}, + "EXP_SYMBOL" : function () {}, + "PERMILL" : function () {}, + "INFINITY" : function () {}, + "NAN" : function () {}, + "DECIMAL_PATTERN" : function () {}, + "SCIENTIFIC_PATTERN" : function () {}, + "PERCENT_PATTERN" : function () {}, + "CURRENCY_PATTERN" : function () {}, + "DEF_CURRENCY_CODE" : function () {}, + "decimals" : function () {}, + "decodeURI" : function () {}, + "default" : function () {}, + "defaultAccount" : function () {}, + "defaultSeparator" : function () {}, + "delay" : function () {}, + "DesktopNotification" : function () {}, + "DeviceEventEmitter" : function () {}, + "Dimensions" : function () {}, + "dispatch" : function () {}, + "displayNotification" : function () {}, + "dividedBy" : function () {}, + "DocumentDirectoryPath" : function () {}, + "dx" : function () {}, + "dy" : function () {}, + "ease" : function () {}, + "Easing" : function () {}, + "enableVibration" : function () {}, + "encode" : function () {}, + "encodeURIComponent" : function () {}, + "encryptionKey" : function () {}, + "end" : function () {}, + "endCoordinates" : function () {}, + "entries" : function () {}, + "eq" : function () {}, + "Error" : function () {}, + "error" : function () {}, + "ErrorUtils" : function () {}, + "estimateGas" : function () {}, + "eth" : function () {}, + "event" : function () {}, + "EventEmmiter" : function () {}, + "exec" : function () {}, + "execute" : function () {}, + "exists" : function () {}, + "extPost" : function () {}, + "extractGroupMembershipSignatures" : function () {}, + "identicon": function() {}, + "generateAlias": function() {}, + "fallbacks" : function () {}, + "fetch" : function () {}, + "firebase" : function () {}, + "floor" : function () {}, + "focus" : function () {}, + "format" : function () {}, + "FormData" : function () {}, + "from" : function () {}, + "fromCharCode" : function () {}, + "fromWei" : function () {}, + "generateAndLoadKey" : function () {}, + "generateMnemonic" : function () {}, + "generateSymKeyFromPassword" : function () {}, + "get" : function () {}, + "getApplicationInfo" : function () {}, + "getBalance" : function () {}, + "getBlock" : function () {}, + "getBlockNumber" : function () {}, + "getConnectionInfo" : function () {}, + "getDomain" : function () {}, + "getGasPrice" : function () {}, + "getGenericPassword" : function () {}, + "getGlobalHandler" : function () {}, + "getInitialNotification" : function () {}, + "getInitialURL" : function () {}, + "getInternetCredentials" : function () {}, + "getItem" : function () {}, + "getKeys" : function () {}, + "getLayout" : function () {}, + "getNetwork" : function () {}, + "getNode" : function () {}, + "getNodesFromContract" : function () {}, + "getPublicKey" : function () {}, + "publicKey": function() {}, + "alias": function() {}, + "getSecurityLevel" : function () {}, + "getStateForAction" : function () {}, + "getString" : function () {}, + "getSymKey" : function () {}, + "getSyncing" : function () {}, + "getTimezoneOffset" : function () {}, + "getToken" : function () {}, + "getTransactionReceipt" : function () {}, + "getValue" : function () {}, + "goog" : function () {}, + "greaterThanOrEqualTo" : function () {}, + "GroupMembershipUpdate" : function () {}, + "GroupMembershipUpdateHandler" : function () {}, + "guid" : function () {}, + "hashMessage" : function () {}, + "hashTransaction" : function () {}, + "hashTypedData" : function () {}, + "headers" : function () {}, + "height" : function () {}, + "hexToNumber" : function () {}, + "hexToNumberString" : function () {}, + "hexToUtf8" : function () {}, + "utf8ToHex" : function () {}, + "hide" : function () {}, + "i18n" : function () {}, + "ignoreWarnings" : function () {}, + "in" : function () {}, + "index" : function () {}, + "indexOf" : function () {}, + "init" : function () {}, + "initKeystore" : function () {}, + "injectJavaScript" : function () {}, + "installApplet" : function () {}, + "installAppletAndInitCard" : function () {}, + "Int8Array" : function () {}, + "integer" : function () {}, + "interpolate" : function () {}, + "is24Hour" : function () {}, + "isAddress" : function () {}, + "isConnected" : function () {}, + "isConnectionExpensive" : function () {}, + "isDeviceRooted" : function () {}, + "isFocused" : function () {}, + "isLinux" : function () {}, + "isMacOs" : function () {}, + "isMatches" : function () {}, + "isNaN" : function () {}, + "isUnix" : function () {}, + "isWin" : function () {}, + "isZero" : function () {}, + "Item" : function () {}, + "item" : function () {}, + "JSON" : function () {}, + "jsonEvent" : function () {}, + "keccak512" : function () {}, + "Keyboard" : function () {}, + "language" : function () {}, + "layout" : function () {}, + "layoutMeasurement" : function () {}, + "leftPad" : function () {}, + "length" : function () {}, + "LibraryDirectoryPath" : function () {}, + "Linking" : function () {}, + "locale" : function () {}, + "log" : function () {}, + "login" : function () {}, + "loginWithKeycard" : function () {}, + "logout" : function () {}, + "loop" : function () {}, + "lt" : function () {}, + "mail" : function () {}, + "map" : function () {}, + "map->GroupMembershipUpdate" : function () {}, + "MapEntry" : function () {}, + "markTrustedPeer" : function () {}, + "MaskedData" : function () {}, + "Math" : function () {}, + "Message" : function () {}, + "message" : function () {}, + "MessageHandler" : function () {}, + "MessagesSeen" : function () {}, + "MessagesSeenHandler" : function () {}, + "messaging" : function () {}, + "method" : function () {}, + "metadata": function() {}, + "minus" : function () {}, + "plus" : function () {}, + "mkdir" : function () {}, + "module" : function () {}, + "moveFile" : function () {}, + "Multihash" : function () {}, + "name" : function () {}, + "nativeEvent" : function () {}, + "NativeEventEmitter" : function () {}, + "NativeModules" : function () {}, + "navigate" : function () {}, + "navigation" : function () {}, + "NavigationActions" : function () {}, + "NavigationEvents" : function () {}, + "newKeyPair" : function () {}, + "newMessageFilter" : function () {}, + "newRawMessageFilter": function() {}, + "newSymKey" : function () {}, + "nfcIsEnabled" : function () {}, + "nfcIsSupported" : function () {}, + "Notification" : function () {}, + "notification" : function () {}, + "notifications" : function () {}, + "now" : function () {}, + "Number" : function () {}, + "NumberFormatSymbols" : function () {}, + "NumberFormatSymbols_af" : function () {}, + "NumberFormatSymbols_am" : function () {}, + "NumberFormatSymbols_ar" : function () {}, + "NumberFormatSymbols_ar_DZ" : function () {}, + "NumberFormatSymbols_az" : function () {}, + "NumberFormatSymbols_be" : function () {}, + "NumberFormatSymbols_bg" : function () {}, + "NumberFormatSymbols_bn" : function () {}, + "NumberFormatSymbols_br" : function () {}, + "NumberFormatSymbols_bs" : function () {}, + "NumberFormatSymbols_cs" : function () {}, + "NumberFormatSymbols_cy" : function () {}, + "NumberFormatSymbols_da" : function () {}, + "NumberFormatSymbols_de_CH" : function () {}, + "NumberFormatSymbols_en" : function () {}, + "NumberFormatSymbols_en_AU" : function () {}, + "NumberFormatSymbols_en_CA" : function () {}, + "NumberFormatSymbols_en_IN" : function () {}, + "NumberFormatSymbols_en_SG" : function () {}, + "NumberFormatSymbols_es_419" : function () {}, + "NumberFormatSymbols_fa" : function () {}, + "NumberFormatSymbols_fil" : function () {}, + "NumberFormatSymbols_he" : function () {}, + "NumberFormatSymbols_hr" : function () {}, + "NumberFormatSymbols_hu" : function () {}, + "NumberFormatSymbols_hy" : function () {}, + "NumberFormatSymbols_id" : function () {}, + "NumberFormatSymbols_is" : function () {}, + "NumberFormatSymbols_ja" : function () {}, + "NumberFormatSymbols_ka" : function () {}, + "NumberFormatSymbols_kk" : function () {}, + "NumberFormatSymbols_km" : function () {}, + "NumberFormatSymbols_ko" : function () {}, + "NumberFormatSymbols_ky" : function () {}, + "NumberFormatSymbols_ln" : function () {}, + "NumberFormatSymbols_lo" : function () {}, + "NumberFormatSymbols_mk" : function () {}, + "NumberFormatSymbols_mn" : function () {}, + "NumberFormatSymbols_mo" : function () {}, + "NumberFormatSymbols_ms" : function () {}, + "NumberFormatSymbols_my" : function () {}, + "NumberFormatSymbols_nb" : function () {}, + "NumberFormatSymbols_ne" : function () {}, + "NumberFormatSymbols_pl" : function () {}, + "NumberFormatSymbols_pt" : function () {}, + "NumberFormatSymbols_ro" : function () {}, + "NumberFormatSymbols_ru" : function () {}, + "NumberFormatSymbols_sh" : function () {}, + "NumberFormatSymbols_si" : function () {}, + "NumberFormatSymbols_sq" : function () {}, + "NumberFormatSymbols_sv" : function () {}, + "NumberFormatSymbols_sw" : function () {}, + "NumberFormatSymbols_th" : function () {}, + "NumberFormatSymbols_tr" : function () {}, + "NumberFormatSymbols_uk" : function () {}, + "NumberFormatSymbols_ur" : function () {}, + "NumberFormatSymbols_uz" : function () {}, + "NumberFormatSymbols_vi" : function () {}, + "NumberFormatSymbols_zh" : function () {}, + "NumberFormatSymbols_zh_HK" : function () {}, + "NumberFormatSymbols_zh_TW" : function () {}, + "numberToHex" : function () {}, + "ok" : function () {}, + "onMessage" : function () {}, + "onNotification" : function () {}, + "onNotificationOpened" : function () {}, + "onTokenRefresh" : function () {}, + "openAccounts" : function () {}, + "openNfcSettings" : function () {}, + "openPicker" : function () {}, + "openURL" : function () {}, + "OS" : function () {}, + "out" : function () {}, + "p" : function () {}, + "pageY" : function () {}, + "pair" : function () {}, + "PairInstallation" : function () {}, + "PairInstallationHandler" : function () {}, + "panHandlers" : function () {}, + "PanResponder" : function () {}, + "parallel" : function () {}, + "parse" : function () {}, + "parseFloat" : function () {}, + "parseInt" : function () {}, + "password" : function () {}, + "path" : function () {}, + "payload" : function () {}, + "PermissionsAndroid" : function () {}, + "PersistentPriorityMap" : function () {}, + "PersonalRequestCommand" : function () {}, + "PersonalSendCommand" : function () {}, + "Platform" : function () {}, + "pow" : function () {}, + "Priority" : function () {}, + "Category" : function () {}, + "High" : function () {}, + "Importance" : function () {}, + "prepareDirAndUpdateConfig" : function () {}, + "Promise" : function () {}, + "props" : function () {}, + "prototype" : function () {}, + "push" : function () {}, + "quad" : function () {}, + "ReactNative" : function () {}, + "readDir" : function () {}, + "readFile" : function () {}, + "recoverAccount" : function () {}, + "reduce" : function () {}, + "register" : function () {}, + "registerComponent" : function () {}, + "registerHeadlessTask" : function () {}, + "reject" : function () {}, + "reload" : function () {}, + "remove" : function () {}, + "removeAllListeners" : function () {}, + "removeEventListener" : function () {}, + "removeKey" : function () {}, + "removeKeyWithUnpair" : function () {}, + "removeListener" : function () {}, + "repeat" : function () {}, + "request" : function () {}, + "requestMessages" : function () {}, + "requestMultiple" : function () {}, + "requestPermission" : function () {}, + "require" : function () {}, + "reset" : function () {}, + "resetGenericPassword" : function () {}, + "resetInternetCredentials" : function () {}, + "resolve" : function () {}, + "respond" : function () {}, + "rightPad" : function () {}, + "round" : function () {}, + "routeName" : function () {}, + "router" : function () {}, + "routes" : function () {}, + "saveAccountAndLogin" : function () {}, + "saveAccountAndLoginWithKeycard" : function () {}, + "schemaVersion" : function () {}, + "scrollTo" : function () {}, + "scrollToEnd" : function () {}, + "scrollToIndex" : function () {}, + "section" : function () {}, + "selection" : function () {}, + "sendDataNotification" : function () {}, + "sendDirectMessage" : function () {}, + "sendLogs" : function () {}, + "sendPairingMessage" : function () {}, + "sendPublicMessage" : function () {}, + "sendToBridge" : function () {}, + "sendTransaction" : function () {}, + "sendTransactionWithSignature" : function () {}, + "separators" : function () {}, + "sequence" : function () {}, + "set" : function () {}, + "setAutoCancel" : function () {}, + "setBackgroundColor" : function () {}, + "setBarStyle" : function () {}, + "setBlankPreviewFlag" : function () {}, + "setCategory" : function () {}, + "setChannelId" : function () {}, + "setCurrentDapp" : function () {}, + "setDockBadgeLabel" : function () {}, + "setGenericPassword" : function () {}, + "setGlobalHandler" : function () {}, + "setGroup" : function () {}, + "setHidden" : function () {}, + "setInternetCredentials" : function () {}, + "setInterval" : function () {}, + "setItem" : function () {}, + "setNativeProps" : function () {}, + "setNetworkActivityIndicatorVisible" : function () {}, + "setPriority" : function () {}, + "setShowBadge" : function () {}, + "setSmallIcon" : function () {}, + "setSoftInputMode" : function () {}, + "setSound" : function () {}, + "setString" : function () {}, + "setTimeout" : function () {}, + "setTranslucent" : function () {}, + "setUsername" : function () {}, + "setValue" : function () {}, + "sha3" : function () {}, + "Share" : function () {}, + "share" : function () {}, + "shh" : function () {}, + "show" : function () {}, + "showActionSheetWithOptions" : function () {}, + "showPicker" : function () {}, + "sign" : function () {}, + "signGroupMembership" : function () {}, + "signMessage" : function () {}, + "signTypedData" : function () {}, + "slice" : function () {}, + "SplashScreen" : function () {}, + "spring" : function () {}, + "stack" : function () {}, + "StackActions" : function () {}, + "start" : function () {}, + "startNode" : function () {}, + "state" : function () {}, + "Status" : function () {}, + "status" : function () {}, + "statusText" : function () {}, + "stop" : function () {}, + "stopAnimation" : function () {}, + "stopNode" : function () {}, + "stopWatching" : function () {}, + "stream" : function () {}, + "String" : function () {}, + "stringify" : function () {}, + "subscribe" : function () {}, + "substr" : function () {}, + "symbol" : function () {}, + "SyncInstallation" : function () {}, + "SyncInstallationHandler" : function () {}, + "t" : function () {}, + "takePictureAsync" : function () {}, + "Text" : function () {}, + "text" : function () {}, + "TextEncoder" : function () {}, + "then" : function () {}, + "times" : function () {}, + "timestamp" : function () {}, + "timing" : function () {}, + "title" : function () {}, + "toAscii" : function () {}, + "toChecksumAddress" : function () {}, + "toFixed" : function () {}, + "toHex" : function () {}, + "toLocaleString" : function () {}, + "toNumber" : function () {}, + "torchMode" : function () {}, + "toString" : function () {}, + "totalSupply" : function () {}, + "toTwosComplement" : function () {}, + "toUtf8" : function () {}, + "toWei" : function () {}, + "translations" : function () {}, + "type": function() {}, + "Uint8Array" : function () {}, + "unblockPin" : function () {}, + "unlink" : function () {}, + "unpair" : function () {}, + "unpairAndDelete" : function () {}, + "updateMailservers" : function () {}, + "Uri" : function () {}, + "url" : function () {}, + "Value" : function () {}, + "value" : function () {}, + "verify" : function () {}, + "verifyPin" : function () {}, + "Version" : function () {}, + "version" : function () {}, + "vibrate" : function () {}, + "View" : function () {}, + "FlatList" : function () {}, + "warn" : function () {}, + "WebView" : function () {}, + "WebViewBridgeModule" : function () {}, + "width" : function () {}, + "window" : function () {}, + "writeCopyTo" : function () {}, + "x" : function () {}, + "y" : function () {}, + "YellowBox" : function () {}, + "UtcDateTime": function () {}, + "fromTimestamp": function () {}, + "ERAS": function () {}, + "ERANAMES": function () {}, + "NARROWMONTHS": function () {}, + "STANDALONENARROWMONTHS": function () {}, + "MONTHS": function () {}, + "STANDALONEMONTHS": function () {}, + "SHORTMONTHS": function () {}, + "STANDALONESHORTMONTHS": function () {}, + "WEEKDAYS": function () {}, + "STANDALONEWEEKDAYS": function () {}, + "SHORTWEEKDAYS": function () {}, + "STANDALONESHORTWEEKDAYS": function () {}, + "NARROWWEEKDAYS": function () {}, + "STANDALONENARROWWEEKDAYS": function () {}, + "SHORTQUARTERS": function () {}, + "QUARTERS": function () {}, + "AMPMS": function () {}, + "DATEFORMATS": function () {}, + "TIMEFORMATS": function () {}, + "DATETIMEFORMATS": function () {}, + "FIRSTDAYOFWEEK": function () {}, + "WEEKENDRANGE": function () {}, + "FIRSTWEEKCUTOFFDAY": function () {}, + "decimalPlaces": function () {}, + "_android": function () {}, + "isSupported" : function () {}, + "authenticate" : function () {}, + "createAppContainer" : function () {}, + "useScreens" : function () {}, + "multiAccountGenerateAndDeriveAddresses" : function () {}, + "multiAccountStoreDerived" : function () {}, + "multiAccountDeriveAddresses" : function () {}, + "multiAccountReset" : function () {}, + "multiAccountLoadAccount" : function () {}, + "multiAccountStoreAccount" : function () {}, + "multiAccountImportMnemonic" : function () {} } diff --git a/src/status_im/data_store/messages.cljs b/src/status_im/data_store/messages.cljs index d293340ba7..5687e8bdf3 100644 --- a/src/status_im/data_store/messages.cljs +++ b/src/status_im/data_store/messages.cljs @@ -5,6 +5,7 @@ [clojure.string :as string] [taoensso.timbre :as log] [re-frame.core :as re-frame] + [status-im.utils.types :as utils.types] [status-im.ethereum.json-rpc :as json-rpc] [status-im.constants :as constants] [status-im.utils.core :as utils])) @@ -12,7 +13,7 @@ (defn prepare-content [content] (if (string? content) content - (pr-str content))) + (utils.types/clj->json content))) (defn ->rpc [message] (-> message diff --git a/src/status_im/signals/core.cljs b/src/status_im/signals/core.cljs index 8361e6d985..fec5cab564 100644 --- a/src/status_im/signals/core.cljs +++ b/src/status_im/signals/core.cljs @@ -2,6 +2,7 @@ (:require [status-im.ethereum.subscriptions :as ethereum.subscriptions] [status-im.i18n :as i18n] [status-im.mailserver.core :as mailserver] + [clojure.string :as string] [status-im.multiaccounts.login.core :as login] [status-im.multiaccounts.model :as multiaccounts.model] [status-im.pairing.core :as pairing] @@ -42,19 +43,23 @@ (fx/defn process [cofx event-str] - (let [{:keys [type event]} (types/json->clj event-str)] + ;; We only convert to clojure when strictly necessary or we know it + ;; won't impact performance, as it is a fairly costly operation on large-ish + ;; data structures + (let [data (.parse js/JSON event-str) + event-js (.-event data) + type (.-type data)] (case type - "node.login" (status-node-started cofx event) - "envelope.sent" (transport.message/update-envelopes-status cofx (:ids event) :sent) - "envelope.expired" (transport.message/update-envelopes-status cofx (:ids event) :not-sent) - "bundles.added" (pairing/handle-bundles-added cofx event) - "mailserver.request.completed" (mailserver/handle-request-completed cofx event) + "node.login" (status-node-started cofx (js->clj event-js :keywordize-keys true)) + "envelope.sent" (transport.message/update-envelopes-status cofx (:ids (js->clj event-js :keywordize-keys true)) :sent) + "envelope.expired" (transport.message/update-envelopes-status cofx (:ids (js->clj event-js :keywordize-keys true)) :not-sent) + "mailserver.request.completed" (mailserver/handle-request-completed cofx (js->clj event-js :keywordize-keys true)) "mailserver.request.expired" (when (multiaccounts.model/logged-in? cofx) - (mailserver/resend-request cofx {:request-id (:hash event)})) - "discovery.summary" (summary cofx event) - "subscriptions.data" (ethereum.subscriptions/handle-signal cofx event) - "subscriptions.error" (ethereum.subscriptions/handle-error cofx event) - "whisper.filter.added" (transport.filters/handle-negotiated-filter cofx event) - "messages.new" (transport.message/receive-messages cofx event) - "wallet" (ethereum.subscriptions/new-wallet-event cofx event) - (log/debug "Event " type " not handled" event)))) + (mailserver/resend-request cofx {:request-id (.-hash event-js)})) + "discovery.summary" (summary cofx (js->clj event-js :keywordize-keys true)) + "subscriptions.data" (ethereum.subscriptions/handle-signal cofx (js->clj event-js :keywordize-keys true)) + "subscriptions.error" (ethereum.subscriptions/handle-error cofx (js->clj event-js :keywordize-keys true)) + "whisper.filter.added" (transport.filters/handle-negotiated-filter cofx (js->clj event-js :keywordize-keys true)) + "messages.new" (transport.message/receive-messages cofx event-js) + "wallet" (ethereum.subscriptions/new-wallet-event cofx (js->clj event-js :keywordize-keys true)) + (log/debug "Event " type " not handled")))) diff --git a/src/status_im/transport/message/core.cljs b/src/status_im/transport/message/core.cljs index 135f0ee566..710254ad3f 100644 --- a/src/status_im/transport/message/core.cljs +++ b/src/status_im/transport/message/core.cljs @@ -26,13 +26,19 @@ dedup-id is passed by status-go and is used to deduplicate messages at that layer. Once a message has been successfuly processed, that id needs to be sent back in order to stop receiving that message" - [cofx now-in-s filter-chat-id message] + [cofx now-in-s filter-chat-id message-js] (let [blocked-contacts (get-in cofx [:db :contacts/blocked] #{}) - {{:keys [payload timestamp]} :message - metadata :metadata - raw-payload :raw-payload} (add-raw-payload message) + payload (.-payload message-js) + timestamp (.-timestamp (.-message message-js)) + metadata-js (.-metadata message-js) + metadata {:author {:publicKey (.-publicKey (.-author metadata-js)) + :alias (.-alias (.-author metadata-js)) + :identicon (.-identicon (.-author metadata-js))} + :dedupId (.-dedupId metadata-js) + :encryptionId (.-encryptionId metadata-js) + :messageId (.-messageId metadata-js)} + raw-payload {:raw-payload message-js} status-message (-> payload - ethereum/hex-to-utf8 transit/deserialize) sig (-> metadata :author :publicKey)] (when (and sig @@ -70,21 +76,24 @@ (apply fx/merge cofx receive-message-fxs)) (log/error "Something went wrong" error messages))) -(fx/defn receive-messages [cofx event] +(fx/defn receive-messages [cofx event-js] (let [fxs (keep - (fn [{:keys [chat messages error]}] - (when (seq messages) - (receive-whisper-messages - error - messages + (fn [message-specs] + (let [chat (.-chat message-specs) + messages (.-messages message-specs) + error (.-error message-specs)] + (when (seq messages) + (receive-whisper-messages + error + messages ;; For discovery and negotiated filters we don't ;; set a chatID, and we use the signature of the message ;; to indicate which chat it is for - (if (or (:discovery chat) - (:negotiated chat)) - nil - (:chatId chat))))) - (:messages event))] + (if (or (.-discovery chat) + (.-negotiated chat)) + nil + (.-chatId chat)))))) + (.-messages event-js))] (apply fx/merge cofx fxs))) (fx/defn remove-hash diff --git a/src/status_im/ui/screens/navigation.cljs b/src/status_im/ui/screens/navigation.cljs index 56526ccc1c..65a48fc898 100644 --- a/src/status_im/ui/screens/navigation.cljs +++ b/src/status_im/ui/screens/navigation.cljs @@ -122,4 +122,4 @@ {:db (-> db (assoc :prev-tab-view-id (:view-id db)) (assoc :prev-view-id (:view-id db)))} - (navigate-to-cofx view-id {})))) \ No newline at end of file + (navigate-to-cofx view-id {})))) diff --git a/src/status_im/utils/core.cljc b/src/status_im/utils/core.cljc index 12d98a1e70..859bc7a963 100644 --- a/src/status_im/utils/core.cljc +++ b/src/status_im/utils/core.cljc @@ -1,7 +1,5 @@ (ns status-im.utils.core (:require [clojure.string :as str] - #?(:cljs [cljs.tools.reader.edn :as edn] - :clj [clojure.tools.reader.edn :as edn]) [taoensso.timbre :as log])) (defn truncate-str @@ -70,6 +68,6 @@ #?(:cljs (defn safe-read-message-content [content] (try - (edn/read-string content) + (js->clj (.parse js/JSON content) :keywordize-keys true) (catch :default e (log/warn "failed to transform message with " e))))) diff --git a/status-go-version.json b/status-go-version.json index f0e8b82a6e..52df2ddae2 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -2,7 +2,7 @@ "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh ' instead", "owner": "status-im", "repo": "status-go", - "version": "v0.34.0-beta.0", - "commit-sha1": "94228bce2ee6a7a5f62917e28247a22c37b6699b", - "src-sha256": "0f62yh94vn6k4gqa50r3gxzscqabmgc047sng291g5wp6d755fmr" + "version": "5f2544f1e8f2ee832bbab95c8d74e26ba0ab2481", + "commit-sha1": "5f2544f1e8f2ee832bbab95c8d74e26ba0ab2481", + "src-sha256": "0dlkr6056mhyny9k895zs5012ywiz75qm6y7a6hypb3pfxr35931" } diff --git a/test/cljs/status_im/test/data_store/messages.cljs b/test/cljs/status_im/test/data_store/messages.cljs index 7caf2cfd9a..5f0d40feaf 100644 --- a/test/cljs/status_im/test/data_store/messages.cljs +++ b/test/cljs/status_im/test/data_store/messages.cljs @@ -27,7 +27,7 @@ :from from :chatId chat-id :replyTo "id-2" - :content "{:chat-id \"chat-id\", :response-to-v2 \"id-2\", :text \"hta\"}" + :content "{\"chat-id\":\"chat-id\",\"response-to-v2\":\"id-2\",\"text\":\"hta\"}" :contentType "text/plain" :messageType "public-group-user-message" :clockValue 2 @@ -55,12 +55,12 @@ :whisperTimestamp 1 :from from :chatId chat-id - :content "{:chat-id \"chat-id\", :text \"hta\"}" + :content "{\"chat-id\":\"chat-id\",\"text\":\"hta\"}" :contentType "text/plain" :messageType "public-group-user-message" :clockValue 2 :quotedMessage {:from "from" - :content "{:chat-id \"chat-id\", :text \"reply\"}"} + :content "{\"chat-id\":\"chat-id\",\"text\":\"reply\"}"} :timestamp 3 :outgoingStatus "sending"}] (is (= expected (m/<-rpc message)))))) diff --git a/test/cljs/status_im/test/transport/core.cljs b/test/cljs/status_im/test/transport/core.cljs index bc83ae5b30..14f077f775 100644 --- a/test/cljs/status_im/test/transport/core.cljs +++ b/test/cljs/status_im/test/transport/core.cljs @@ -46,16 +46,17 @@ (def sig "0x04325367620ae20dd878dbb39f69f02c567d789dd21af8a88623dc5b529827c2812571c380a2cd8236a2851b8843d6486481166c39debf60a5d30b9099c66213e4") -(def messages [{:id "someid" - :metadata {:author {:publicKey sig}} - :message {:sig sig - :ttl 10 - :timestamp 1527692015 - :topic "0x9c22ff5f" - :payload "0x5b227e236334222c5b2246222c22746578742f706c61696e222c227e3a7075626c69632d67726f75702d757365722d6d657373616765222c3135323736393230313433383130312c313532373639323031343337375d5d" - :padding "0xbf06347cc7f9aa18b4a846032264a88f559d9b14079975d14b10648847c0543a77a80624e101c082d19b502ae3b4f97958d18abf59eb0a82afc1301aa22470495fac739a30c2f563599fa8d8e09363a43d39311596b7f119dee7b046989c08224f1ef5cdc385" - :pow 0.002631578947368421 - :hash "0x220ef9994a4fae64c112b27ed07ef910918159cbe6fcf8ac515ee2bf9a6711a0"}}]) +(def messages [(clj->js {:id "someid" + :metadata {:author {:publicKey sig}} + :payload "[\"~#c4\",[\"F\",\"text/plain\",\"~:public-group-user-message\",152769201438101,1527692014377]]" + :message {:sig sig + :ttl 10 + :timestamp 1527692015 + :topic "0x9c22ff5f" + :payload "0x5b227e236334222c5b2246222c22746578742f706c61696e222c227e3a7075626c69632d67726f75702d757365722d6d657373616765222c3135323736393230313433383130312c313532373639323031343337375d5d" + :padding "0xbf06347cc7f9aa18b4a846032264a88f559d9b14079975d14b10648847c0543a77a80624e101c082d19b502ae3b4f97958d18abf59eb0a82afc1301aa22470495fac739a30c2f563599fa8d8e09363a43d39311596b7f119dee7b046989c08224f1ef5cdc385" + :pow 0.002631578947368421 + :hash "0x220ef9994a4fae64c112b27ed07ef910918159cbe6fcf8ac515ee2bf9a6711a0"}})]) (deftest receive-whisper-messages-test (testing "an error is reported"