1
This commit is contained in:
parent
e183c14106
commit
49ee8ade87
@ -11,6 +11,7 @@ class Staking extends BaseModel {
|
|||||||
|
|
||||||
public static function all($address)
|
public static function all($address)
|
||||||
{
|
{
|
||||||
|
$result = array();
|
||||||
$rows = SqlHelper::ormSelect(
|
$rows = SqlHelper::ormSelect(
|
||||||
myself()->_getMysql(''),
|
myself()->_getMysql(''),
|
||||||
't_staking',
|
't_staking',
|
||||||
@ -18,7 +19,22 @@ class Staking extends BaseModel {
|
|||||||
'address' => $address
|
'address' => $address
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return $rows;
|
foreach ($rows as $row) {
|
||||||
|
if ($row['nft_type'] == self::NFT721) {
|
||||||
|
if (!$row['item_id']) {
|
||||||
|
$itemId = 0;
|
||||||
|
$tokenType = 0;
|
||||||
|
if (!self::repair721NftInfo($row['token_id'], $row['contract_address'], $row['net_id'],
|
||||||
|
$row['start_time'], $itemId, $tokenType)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$row['item_id'] = $itemId;
|
||||||
|
$row['token_type'] = $tokenType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
array_push($result, $row);
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function staked721($data, $netId)
|
public static function staked721($data, $netId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user