Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
lightning-bits
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
lightning-bits
Commits
fdcfc05e
Commit
fdcfc05e
authored
Apr 06, 2022
by
bitsoko services
👷🏿
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.7.9' into 'master'
update See merge request
!1
parents
ee57f1b5
ab6298e5
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
11 deletions
+31
-11
.eslintcache
.eslintcache
+1
-0
.gitignore
.gitignore
+1
-0
package.json
package.json
+1
-1
index.js
src/action/index.js
+5
-4
pool-add-liquid.js
src/action/pool-add-liquid.js
+3
-3
helper.js
src/helper.js
+12
-0
promotion-detail.js
src/view/promotion-detail.js
+8
-3
No files found.
.eslintcache
0 → 100755
View file @
fdcfc05e
This diff is collapsed.
Click to expand it.
.gitignore
View file @
fdcfc05e
...
...
@@ -2,6 +2,7 @@
# dependencies
/node_modules
/node_modules*
# testing
/coverage
...
...
package.json
View file @
fdcfc05e
...
...
@@ -22,7 +22,7 @@
"preelectron-pack"
:
"npm run build"
,
"prettier"
:
"prettier --write --single-quote --trailing-comma es5
\"
src/**/*.js
\"
public/electron.js"
,
"preinstall"
:
"npx npm-force-resolutions"
,
"postinstall"
:
"npm install -g @grpc/proto-loader @grpc/grpc-js react-dom faker --runtime=electron && npm run protobuf"
,
"postinstall"
:
"
pip3 install git+https://git.bitsoko.org/bitsoko/tinyman-py-sdk.git &&
npm install -g @grpc/proto-loader @grpc/grpc-js react-dom faker --runtime=electron && npm run protobuf"
,
"storybook"
:
"start-storybook -p 9009 -s public"
,
"build-storybook"
:
"build-storybook -s public"
,
"build-icon"
:
"svgr --native --icon --filename-case kebab -d src/asset/icon src/asset/icon"
,
...
...
src/action/index.js
View file @
fdcfc05e
...
...
@@ -8,7 +8,7 @@ import { PREFIX_URI } from '../config';
import
{
when
}
from
'mobx'
;
import
{
Clipboard
}
from
'react-native'
;
import
AsyncStorage
from
'@react-native-async-storage/async-storage'
;
import
{
nap
,
checkHttpStatus
,
toSatoshis
}
from
'../helper'
;
import
{
nap
,
checkHttpStatus
,
toSatoshis
,
signMessage
}
from
'../helper'
;
import
store
from
'../store'
;
import
AppStorage
from
'./app-storage'
;
import
IpcAction
from
'./ipc'
;
...
...
@@ -200,7 +200,8 @@ when(
store
.
settings
.
chains
.
algo
.
account
.
address
);
console
.
log
(
'algo account! '
+
accountInfo
);
await
signMessage
(
'habari kwa dunia'
,
grpc
,
notify
);
/*
//var poolStats = await grpc.initPyface(['/data/lightning-bits/src/chains/algo/pools.py', 'bootstrap', 70232824, 0, '289:BITS', 'ALGO', 'TTNTINGI6AKN6JBHCAOXVFZN72BAMDNBTHZ3ZRQC3ILAMWONKN7XRRQ6GM' ]);
var poolStats = await grpc.initPyface([
'/data/lightning-bits/src/chains/algo/pools.py',
...
...
@@ -214,7 +215,7 @@ when(
console.log(poolStats);
store.settings.chains.algo.account.balance =
JSON.parse(poolStats).amount / 1000000 + ' ALGOS';
/*
if(!store.chains.sol.account){
var solAccount = await Solana.createWallet();
...
...
@@ -284,7 +285,7 @@ when(
if
(
store
.
settings
.
soko
.
enabled
)
{
// invoice generation interval and count for multiple paypoints
// every hour
const
webInvInt
=
3
600000
;
const
webInvInt
=
600000
;
const
webInvCount
=
2
;
const
sokoInt
=
setInterval
(
async
function
()
{
if
(
!
store
.
settings
.
soko
.
enabled
)
{
...
...
src/action/pool-add-liquid.js
View file @
fdcfc05e
...
...
@@ -137,12 +137,12 @@ class PoolAddAction {
* is either in btc or fiat depending on user settings.
* @param {string} options.amount The string formatted number
*/
async
setAmount
({
amo
})
{
this
.
_store
.
payment
.
amount
=
amo
;
async
setAmount
({
amo
unt
})
{
this
.
_store
.
payment
.
amount
=
amo
unt
;
this
.
_store
.
payment
.
sendAll
=
false
;
this
.
setAddress
({
address
:
''
});
const
{
settings
}
=
this
.
_store
;
var
amount
=
toSatoshis
(
amo
,
settings
);
amount
=
toSatoshis
(
amount
,
settings
);
//check if contract has enough balance first
console
.
log
(
...
...
src/helper.js
View file @
fdcfc05e
...
...
@@ -141,6 +141,18 @@ export const toAmountLabel = (satoshis, settings) => {
:
formatNumber
(
toAmount
(
satoshis
,
settings
));
};
export
const
signMessage
=
async
(
msg
,
grpc
,
notify
)
=>
{
try
{
const
response
=
await
grpc
.
sendCommand
(
'signMessage'
,
{
msg
:
msg
,
});
console
.
log
(
response
);
//return res;
}
catch
(
err
)
{
notify
.
display
({
msg
:
'Creating web invoice failed!'
,
err
});
}
};
export
const
addAsaQuote
=
async
(
grpc
,
store
,
aID1
,
aID2
)
=>
{
// var quote = await grpc.initPyface(['/data/lightning-bits/src/chains/algo/pools.py', 'addLiq', aID1, aID2 , store.settings.chains.algo.account.address, store.settings.chains.algo.account.mnemonic, 1]);
//var poolStats = await grpc.initPyface(['/data/lightning-bits/src/chains/algo/pools.py', 'bootstrap', aID1, aID2, store.settings.chains.algo.account.address, store.settings.chains.algo.account.mnemonic ]);
...
...
src/view/promotion-detail.js
View file @
fdcfc05e
...
...
@@ -66,7 +66,7 @@ const PromotionDetailView = ({ store, nav }) => (
{
store
.
selectedPromotion
.
preimage
}
<
/DetailField
>
)
:
null
}
<
SendReceiveButton
nav
=
{
()
=>
nav
}
/
>
<
SendReceiveButton
nav
=
{
nav
}
/
>
<
/Modal
>
<
/MainContent
>
<
/Background
>
...
...
@@ -114,14 +114,19 @@ const SendReceiveButton = ({ nav }) => (
Transfer
<
/GlasButton
>
<
View
style
=
{
bigBtnStyles
.
boltWrapper
}
><
/View
>
<
GlasButton
onPress
=
{
nav
}
style
=
{
bigBtnStyles
.
rightBtn
}
>
<
GlasButton
onPress
=
{
nav
.
goURL
(
'https://dooca.bitsoko.org/bits/index-28.html#promoid=13'
)}
style
=
{
bigBtnStyles
.
rightBtn
}
>
Redeem
<
/GlasButton
>
<
/View
>
);
SendReceiveButton
.
propTypes
=
{
nav
:
PropTypes
.
func
.
isRequired
,
nav
:
PropTypes
.
object
.
isRequired
,
};
export
default
observer
(
PromotionDetailView
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment