Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
token
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
wallet
token
Commits
1f9387b4
Commit
1f9387b4
authored
Nov 25, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
95e79695
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
WalletController.php
api/controllers/WalletController.php
+1
-1
Chain33Service.php
common/service/chain33/Chain33Service.php
+11
-4
No files found.
api/controllers/WalletController.php
View file @
1f9387b4
...
...
@@ -111,7 +111,7 @@ class WalletController extends BaseController
}
$service
=
new
Chain33Service
(
$node
);
$address
[]
=
$token
;
$result
=
$service
->
getBalance
(
$address
,
$platform
->
exer
,
$symbol
);
$result
=
$service
->
get
Token
Balance
(
$address
,
$platform
->
exer
,
$symbol
);
if
(
0
!==
$result
[
'code'
])
{
$msg
=
'当前发币人数过多,请客官稍后再试'
;
$code
=
-
1
;
...
...
common/service/chain33/Chain33Service.php
View file @
1f9387b4
...
...
@@ -256,18 +256,25 @@ class Chain33Service
return
$this
->
send
(
$params
,
'Chain33.Query'
);
}
public
function
getBalance
(
$address
,
$execer
,
$tokenSymbol
=
''
)
public
function
getBalance
(
$address
,
$execer
)
{
$params
=
[
'addresses'
=>
$address
,
'execer'
=>
$execer
,
];
if
(
!
empty
(
$tokenSymbol
))
{
$params
=
array_merge
(
$params
,
[
'tokenSymbol'
=>
$tokenSymbol
]);
}
return
$this
->
send
(
$params
,
'Chain33.GetBalance'
);
}
public
function
getTokenBalance
(
$address
,
$execer
,
$tokenSymbol
)
{
$params
=
[
'addresses'
=>
$address
,
'execer'
=>
$execer
,
'tokenSymbol'
=>
$tokenSymbol
];
return
$this
->
send
(
$params
,
'token.GetTokenBalance'
);
}
public
function
createNoBalanceTransaction
(
$txHex
,
$payAddr
,
$privkey
)
{
$params
=
[
...
...
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