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
492173a0
Commit
492173a0
authored
Dec 26, 2019
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a54df6a1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
SupportedChainController.php
api/controllers/SupportedChainController.php
+3
-2
CoinSupportedChain.php
common/models/psources/CoinSupportedChain.php
+2
-2
No files found.
api/controllers/SupportedChainController.php
View file @
492173a0
...
...
@@ -28,9 +28,10 @@ class SupportedChainController extends BaseController
}
$data
=
[];
foreach
(
$supported_chain_model
as
$key
=>
&
$val
)
{
$data
[
]
=
!
empty
(
$val
->
coin
)
?
$val
->
co
in
:
''
;
}
$data
[
$key
][
'chain'
]
=
isset
(
$val
->
coin
->
chain
)
?
$val
->
coin
->
cha
in
:
''
;
$data
[
$key
][
'icon'
]
=
isset
(
$val
->
coin
->
icon
)
?
$val
->
coin
->
icon
:
''
;
}
$msg
=
'success'
;
$code
=
0
;
doEnd
:
...
...
common/models/psources/CoinSupportedChain.php
View file @
492173a0
...
...
@@ -41,11 +41,11 @@ class CoinSupportedChain extends BaseActiveRecord
public
function
attributes
()
{
return
array_merge
(
parent
::
attributes
(),
[
'c
oins
'
]);
return
array_merge
(
parent
::
attributes
(),
[
'c
hain'
,
'icon
'
]);
}
public
function
getCoin
()
{
return
$this
->
hasOne
(
Coin
::
className
(),
[
'id'
=>
'coin_id'
])
->
select
(
'name as chain'
);
return
$this
->
hasOne
(
Coin
::
className
(),
[
'id'
=>
'coin_id'
])
->
select
(
'name as chain
, icon
'
);
}
}
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