feat: autotransfer
This commit is contained in:
@@ -22,13 +22,14 @@ class WalletAddress extends Model
|
||||
protected $fillable = [
|
||||
'device_id', 'address', 'chain_type',
|
||||
'usdt', 'trx', 'eth', 'btc', 'bnb',
|
||||
'monitor', 'source',
|
||||
'monitor', 'source', 'mnemonic_id', 'derive_index',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'monitor' => 'integer',
|
||||
'derive_index' => 'integer',
|
||||
'usdt' => 'decimal:6',
|
||||
'trx' => 'decimal:6',
|
||||
'eth' => 'decimal:18',
|
||||
@@ -42,6 +43,11 @@ class WalletAddress extends Model
|
||||
return $this->belongsTo(Device::class);
|
||||
}
|
||||
|
||||
public function mnemonic(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(WalletMnemonic::class, 'mnemonic_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Map a symbol=>amount payload into coin column attributes (only known coins).
|
||||
* Missing symbols are omitted (caller merges with existing row).
|
||||
|
||||
Reference in New Issue
Block a user