Home Reference Source

Function

Static Public Summary
public

acceptTerms(): [type]

[acceptTerms description]

public

addShop(shop: [type])

[addShop description]

public

addTransaction(hash: *)

public

checkUserCertified(ethAddress: *)

public

closeNotificationModal

public

Decode calendar String

public

convertDay(open: Boolean, openAt: String, closeAt: String): String

Encode Day Object

public

deleteShop(description: [Object]): [String]

register a shop, SHOP need to have DTH and to be certified

public

fromState(objectPattern: {"onChange": *, "onBlur": *}, props: *): {"address": *, "name": *, "cat": *, "description": *}

public

get(key: String, defaultValue: Any): Any

Get the value of the corresponding key, if the value is null return defaultValue

public

async getAddress()

public

async getBalance(): Object

return balance of ETH and DTH of the web3 primary account

public
public

async getDthContract()

public

getErrorMessage(errors: Array | String, response: Object): String

Parse api response to return formatted error

public

async getLicenceShop(countryIso: *): *

public

async getNetworkId()

public

return formatted shop

public

async getSmsContract()

public

async getTransactionStatus(hash: [type]): Promise

[getTransactionStatus description]

public

Fetch Client Informations via ip and get the licence price for his country

public

isSmsReg(): Bool

return true if is sms register

public

async isWeb3(): Eth address

know if user as web3 injected

public

async isZoneShopOpen(country: *): *

public

last(array: [type]): [type]

Get the last element of the array

public

mobile(args: ...*)

public

openNotificationModal(objectPattern: {"type": *, "message": *})

openNotificationModal

public

parseError(error: *)

public

phoneVerificationTime(time: [type]): [type]

phoneVerificationTime

public

removeShop(): [type]

removeShop

public

reset()

public
public

rootReducer(state: *, action: *): *

public

scrollToTop(duration: *)

public

sendSms(phoneNumber: string, ethAddress: string, onSuccess: function, onError: function): object

sendSms

public

sendVerifCode(code: string, phoneNumber: string, onSuccess: function, onError: function): object

sendVerifCode

public

setAppInitialized

public

setBalance(balance: *)

public

setDataShopPending(data: [type])

setDataShopPending

public

setEthAddress(ethAddress: *)

public

setEthNetwork(id: [type])

[setEthNetwork description]

public

setLicencePrice(licencePrice: *)

public

setMetamaskInstalled

public

setPhone(phone: String)

setPhone

public

setPhoneCountry(phoneCountry: string)

setPhoneCountry

public

setPhoneSent(phoneSent: boolean)

setPhoneSent

public
public

setShake(context: [type])

setShake

public
public

timeSince(time: [type]): [type]

timeSince

public

toNBytes(str: [type], n: [type]): [type]

[toNBytes description]

public

toggleTermsModal

public

uniqueArray(arr: Array, objKey: String): Array

[filter array of object by a key uniqueness]

public

wait(ms: *)

Static Public

public acceptTerms(): [type] source

import {acceptTerms} from 'dether.shop/src/actions/app/app.js'

[acceptTerms description]

Return:

[type]

[description]

public addShop(shop: [type]) source

import {addShop} from 'dether.shop/src/actions/shop/shop.js'

[addShop description]

Params:

NameTypeAttributeDescription
shop [type]

[description]

public addTransaction(hash: *) source

Params:

NameTypeAttributeDescription
hash *

public checkUserCertified(ethAddress: *) source

import {checkUserCertified} from 'dether.shop/src/actions/user/user.js'

Params:

NameTypeAttributeDescription
ethAddress *

public closeNotificationModal() source

import {closeNotificationModal} from 'dether.shop/src/actions/app/app.js'

closeNotificationModal

public convertCalendar(str: String): Object source

import {convertCalendar} from 'dether.shop/src/helpers/calendar/calendar.js'

Decode calendar String

Params:

NameTypeAttributeDescription
str String

encoded string

Return:

Object

calendar object

public convertDay(open: Boolean, openAt: String, closeAt: String): String source

Encode Day Object

Params:

NameTypeAttributeDescription
open Boolean

is shop open

openAt String

opening hour

closeAt String

closing hour

Return:

String

encoded string

public deleteShop(description: [Object]): [String] source

register a shop, SHOP need to have DTH and to be certified

Params:

NameTypeAttributeDescription
description [Object]

Return:

[String]

transaction hash

public fromState(objectPattern: {"onChange": *, "onBlur": *}, props: *): {"address": *, "name": *, "cat": *, "description": *} source

Params:

NameTypeAttributeDescription
objectPattern {"onChange": *, "onBlur": *}
  • default: {"onChange":null,"onBlur":null}
props *

Return:

{"address": *, "name": *, "cat": *, "description": *}

public get(key: String, defaultValue: Any): Any source

Get the value of the corresponding key, if the value is null return defaultValue

Params:

NameTypeAttributeDescription
key String
defaultValue Any

Return:

Any

public async getAddress() source

public async getBalance(): Object source

return balance of ETH and DTH of the web3 primary account

Return:

Object

public async getDetherContract() source

import {getDetherContract} from 'dether.shop/src/helpers/ethereum/utils.js'

public async getDthContract() source

import {getDthContract} from 'dether.shop/src/helpers/ethereum/utils.js'

public getErrorMessage(errors: Array | String, response: Object): String source

Parse api response to return formatted error

Params:

NameTypeAttributeDescription
errors Array | String

errors returned by api

response Object

response returned by api

Return:

String

error message

public async getLicenceShop(countryIso: *): * source

Params:

NameTypeAttributeDescription
countryIso *

Return:

*

public async getNetworkId() source

import {getNetworkId} from 'dether.shop/src/helpers/ethereum/utils.js'

public getShop(): Object source

return formatted shop

Return:

Object

public async getSmsContract() source

import {getSmsContract} from 'dether.shop/src/helpers/ethereum/utils.js'

public async getTransactionStatus(hash: [type]): Promise source

[getTransactionStatus description]

Params:

NameTypeAttributeDescription
hash [type]

[description]

Return:

Promise

[description]

public initializeClientInfo() source

import {initializeClientInfo} from 'dether.shop/src/actions/app/app.js'

Fetch Client Informations via ip and get the licence price for his country

public isSmsReg(): Bool source

return true if is sms register

Return:

Bool

public async isWeb3(): Eth address source

know if user as web3 injected

Return:

Eth address

public async isZoneShopOpen(country: *): * source

Params:

NameTypeAttributeDescription
country *

Return:

*

public last(array: [type]): [type] source

Get the last element of the array

Params:

NameTypeAttributeDescription
array [type]

Return:

[type]

public mobile(args: ...*) source

import {mobile} from 'dether.shop/src/styles/medias.js'

Params:

NameTypeAttributeDescription
args ...*

public openNotificationModal(objectPattern: {"type": *, "message": *}) source

import {openNotificationModal} from 'dether.shop/src/actions/app/app.js'

openNotificationModal

Params:

NameTypeAttributeDescription
objectPattern {"type": *, "message": *}
  • default: {"type":null,"message":null}

public parseError(error: *) source

import {parseError} from 'dether.shop/src/helpers/parse/parse.js'

Params:

NameTypeAttributeDescription
error *

public phoneVerificationTime(time: [type]): [type] source

import {phoneVerificationTime} from 'dether.shop/src/helpers/timers/timers.js'

phoneVerificationTime

Params:

NameTypeAttributeDescription
time [type]

[description]

Return:

[type]

[description]

public removeShop(): [type] source

import {removeShop} from 'dether.shop/src/actions/shop/shop.js'

removeShop

Return:

[type]

[description]

public reset() source

public resetTransaction() source

public rootReducer(state: *, action: *): * source

import rootReducer from 'dether.shop/src/reducers/index.js'

Params:

NameTypeAttributeDescription
state *
action *

Return:

*

public scrollToTop(duration: *) source

Params:

NameTypeAttributeDescription
duration *

public sendSms(phoneNumber: string, ethAddress: string, onSuccess: function, onError: function): object source

import {sendSms} from 'dether.shop/src/actions/kyc/kyc.js'

sendSms

Params:

NameTypeAttributeDescription
phoneNumber string

user phone number

ethAddress string

user ethereum address

onSuccess function

Success function

onError function

Error function

Return:

object

Action

public sendVerifCode(code: string, phoneNumber: string, onSuccess: function, onError: function): object source

import {sendVerifCode} from 'dether.shop/src/actions/kyc/kyc.js'

sendVerifCode

Params:

NameTypeAttributeDescription
code string

Code verification

phoneNumber string

user phone number

onSuccess function

Success function

onError function

Error function

Return:

object

Action

public setAppInitialized(bool: boolean) source

import {setAppInitialized} from 'dether.shop/src/actions/app/app.js'

setAppInitialized

Params:

NameTypeAttributeDescription
bool boolean

[description]

public setBalance(balance: *) source

import {setBalance} from 'dether.shop/src/actions/user/user.js'

Params:

NameTypeAttributeDescription
balance *

public setDataShopPending(data: [type]) source

import {setDataShopPending} from 'dether.shop/src/actions/shop/shop.js'

setDataShopPending

Params:

NameTypeAttributeDescription
data [type]

[description]

public setEthAddress(ethAddress: *) source

import {setEthAddress} from 'dether.shop/src/actions/user/user.js'

Params:

NameTypeAttributeDescription
ethAddress *

public setEthNetwork(id: [type]) source

import {setEthNetwork} from 'dether.shop/src/actions/app/app.js'

[setEthNetwork description]

Params:

NameTypeAttributeDescription
id [type]

[description]

public setLicencePrice(licencePrice: *) source

import {setLicencePrice} from 'dether.shop/src/actions/app/app.js'

Params:

NameTypeAttributeDescription
licencePrice *

public setMetamaskInstalled(bool: boolean) source

import {setMetamaskInstalled} from 'dether.shop/src/actions/app/app.js'

setMetamaskInstalled

Params:

NameTypeAttributeDescription
bool boolean

if metamask is installed

public setPhone(phone: String) source

import {setPhone} from 'dether.shop/src/actions/kyc/kyc.js'

setPhone

Params:

NameTypeAttributeDescription
phone String

Phone number

public setPhoneCountry(phoneCountry: string) source

import {setPhoneCountry} from 'dether.shop/src/actions/kyc/kyc.js'

setPhoneCountry

Params:

NameTypeAttributeDescription
phoneCountry string

ISO country

public setPhoneSent(phoneSent: boolean) source

import {setPhoneSent} from 'dether.shop/src/actions/kyc/kyc.js'

setPhoneSent

Params:

NameTypeAttributeDescription
phoneSent boolean

[description]

public setPhoneVerified() source

import {setPhoneVerified} from 'dether.shop/src/actions/user/user.js'

public setShake(context: [type]) source

setShake

Params:

NameTypeAttributeDescription
context [type]

[description]

public setTransactionHash(hash: *) source

import {setTransactionHash} from 'dether.shop/src/actions/transaction/transaction.js'

Params:

NameTypeAttributeDescription
hash *

public timeSince(time: [type]): [type] source

timeSince

Params:

NameTypeAttributeDescription
time [type]

[description]

Return:

[type]

[description]

public toNBytes(str: [type], n: [type]): [type] source

[toNBytes description]

Params:

NameTypeAttributeDescription
str [type]

[description]

n [type]

[description]

Return:

[type]

[description]

public toggleTermsModal() source

import {toggleTermsModal} from 'dether.shop/src/actions/app/app.js'

toggleTermsModal

public uniqueArray(arr: Array, objKey: String): Array source

import {uniqueArray} from 'dether.shop/src/helpers/array/array.js'

[filter array of object by a key uniqueness]

Params:

NameTypeAttributeDescription
arr Array

array of object

objKey String

key to filter with

Return:

Array

The filtered array

public wait(ms: *) source

Params:

NameTypeAttributeDescription
ms *