async send(chainLink, signTransaction) {
try {
const web3 = new Web3(chainLink);
const receipt = await new Promise(async (resolve, reject) => {
await web3.eth
.sendSignedTransaction(signTransaction.rawTransaction)
.on('receipt', (receipt) => {
resolve(receipt);
})
.on('error', (error) => {
reject(error);
});
});
return {
status: true,
data: receipt,
};
} catch (e) {
return {
status: false,
message: e.message,
},
}
}
А ошибку ты сам внутри catch заново бросаешь
await с коллбэками эт сильно. это вы писали?
почему вопрос в тайпскрипте?
А сессия стандартная? Не в базе, не в редисе?
@foreach($posts as $post)
Name: {{ $post->name }}
<input type="hidden" form="myform" name="post" value="{{ $post->_id }}">
<button type="submit" form="myform">Удалить</button>
@endforeach
<form method="POST" id="myform" action="{{ route('admin.post.delete') }}">@csrf</form>
Route::group(['prefix' => 'post', 'as' => 'post.'], function() {
Route::post('/delete', [PostController::class, 'delete'])->name('delete');
});
public function delete(Request $request)
{
dd($request->post);
}
Route::group(['prefix' => 'post', 'as' => 'post.'], function() {
Route::post('/delete/{post}', [PostController::class, 'delete'])->name('delete');
});
public function delete(Request $request, Post $post)
{
dd(1);
}
это намек на RediSearch?)