extra wallets

This commit is contained in:
CHIEFSOFT\ameye
2024-10-18 22:07:19 -04:00
parent a6da898570
commit cfb3f6c31e
+10 -8
View File
@@ -232,12 +232,15 @@ class WrenchWallet extends BaseController
$this->saveCache($endpoint,$out,1500);
}
$wallet_country = $first_names = array_column($out['result_list'], 'country');;
$auxWallet = $this->auxiliaryWallets($wallet_country);
if ( count($out["result_list"][])> 0 ){
$owner_country = $out["result_list"][0]['owner_country'];
$wallet_country = $first_names = array_column($owner_country , 'country');;
$auxWallet = $this->auxiliaryWallets($wallet_country);
foreach ($auxWallet as $item){
$out["result_list"][] = $item;
}
}
foreach ($auxWallet as $item){
$out["result_list"][] = $item;
}
/*
$out["result_list"][] = [
"wallet_country" => ['US'],
@@ -305,8 +308,7 @@ class WrenchWallet extends BaseController
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
private function auxiliaryWallets($wallet_country): array {
private function auxiliaryWallets( $owner_country ): array {
$auxWallet = [
[
"wallet_country" => ['US'],
@@ -372,7 +374,7 @@ class WrenchWallet extends BaseController
$retArr=[];
foreach ( $auxWallet as $item){
if ( in_array( $item['owner_country'], $item['wallet_country']) ){
if ( in_array( $owner_country, $item['wallet_country']) ){
log_message('critical', "***** ***** auxiliaryWallets::ITEM ". serialize($item));
$retArr[] =$item;
}