Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Merge pull request #31 from DaoCasino/h_develop
Browse files Browse the repository at this point in the history
H develop
  • Loading branch information
alexstep committed Nov 1, 2017
2 parents 85329ba + 7a82da5 commit 8ff3ade
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ publisher.json
/coverage

# production
/public/static/meta
/dist
/build
/builds
Expand Down
3 changes: 2 additions & 1 deletion DApps/TestDApp/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ window.MyDApp = (function(){
var Roll = function(user_bet, user_num, random_hash){
let profit = -user_bet

const random_num = DCLib.Utils.bigInt(random_hash,16).divmod(65536).remainder.value
const random_num = DCLib.numFromHash(random_hash, 0, 65536)
console.log(random_num)

if (user_num > random_num) {
profit = (user_bet * (65536 - 1310) / user_num) - user_bet
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BankRollerApp",
"version": "0.2.1",
"version": "0.2.2",
"description": "Dao.Casino app for bankroller",
"author": "Dao Casino <team@dao.casino>",
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions public/static/meta/head_meta.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

<title>BankRollerApp App</title>
<title>BankRollerApp</title>
<meta name="description" content="Dao.Casino app for bankroller">
<link rel="manifest" href="public/static/meta/manifest.json">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#1c2026">
<meta name="application-name" content="BankRollerApp App">
<meta name="application-name" content="BankRollerApp">
<link rel="apple-touch-icon" sizes="57x57" href="public/static/meta/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="public/static/meta/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="public/static/meta/apple-touch-icon-72x72.png">
Expand All @@ -16,12 +16,12 @@
<link rel="apple-touch-icon" sizes="180x180" href="public/static/meta/apple-touch-icon-180x180.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="BankRollerApp App">
<link rel="yandex-tableau-widget" href="public/static/meta/yandex-browser-manifest.json">
<meta name="apple-mobile-web-app-title" content="BankRollerApp">
<meta name="msapplication-TileColor" content="#1c2026">
<meta name="msapplication-TileImage" content="public/static/meta/mstile-144x144.png">
<meta name="msapplication-config" content="public/static/meta/browserconfig.xml">
<link rel="icon" type="image/png" sizes="228x228" href="public/static/meta/coast-228x228.png">
<link rel="yandex-tableau-widget" href="public/static/meta/yandex-browser-manifest.json">
<link rel="icon" type="image/png" sizes="32x32" href="public/static/meta/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="public/static/meta/favicon-16x16.png">
<link rel="shortcut icon" href="public/static/meta/favicon.ico">
Expand Down
4 changes: 2 additions & 2 deletions public/static/meta/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "BankRollerApp App",
"short_name": "BankRollerApp App",
"name": "BankRollerApp",
"short_name": "BankRollerApp",
"description": "Dao.Casino app for bankroller",
"dir": "auto",
"lang": "en-US",
Expand Down
4 changes: 2 additions & 2 deletions public/static/meta/manifest.webapp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "0.1.3",
"name": "BankRollerApp App",
"version": "0.2.1",
"name": "BankRollerApp",
"description": "Dao.Casino app for bankroller",
"icons": {
"60": "public/static/meta/firefox_app_60x60.png",
Expand Down
2 changes: 1 addition & 1 deletion public/static/meta/yandex-browser-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.3",
"version": "0.2.1",
"api_version": 1,
"layout": {
"logo": "public/static/meta/yandex-browser-50x50.png",
Expand Down
3 changes: 3 additions & 0 deletions src/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ const networks = {
let current_network = 'ropsten'
if (process.env.NODE_ENV !== 'server' && window && window.localStorage.current_network) {
current_network = window.localStorage.current_network
if(!networks[current_network]){
current_network = 'ropsten'
}

if (current_network=='custom') {
networks.custom.rpc_url = window.localStorage.custom_network_url
Expand Down
9 changes: 8 additions & 1 deletion src/model/DApps/DApps.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,16 @@ class _DCLib {
this.Account = Account
this.web3 = web3
this.Utils = Utils

this.DApp = DApp
}

numFromHash(random_hash, min=0, max=100) {
if (min > max) { let c = min; min = max; max = c }
if (min==max) return max

max++
return Utils.bigInt(random_hash,16).divmod(max-min).remainder.value + min
}
}


Expand Down

0 comments on commit 8ff3ade

Please sign in to comment.