Skip to content

Commit

Permalink
Feature/etherspot prime sdk chore (#49)
Browse files Browse the repository at this point in the history
* fixed prime sdk transaction sending
  • Loading branch information
poocart authored Jul 25, 2023
1 parent 36e1419 commit 28b99db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.4.4] - 2023-07-25

### Fixes
- Fixed transaction sending after recent `@etherspot/prime-sdk` update to version `1.1.0`

## [0.4.3] - 2023-07-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@etherspot/transaction-kit",
"description": "React Etherspot Transaction Kit",
"version": "0.4.3",
"version": "0.4.4",
"main": "dist/cjs/index.js",
"scripts": {
"rollup:build": "NODE_OPTIONS=--max-old-space-size=8192 rollup -c",
Expand Down
4 changes: 2 additions & 2 deletions src/providers/EtherspotTransactionKitContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ const EtherspotTransactionKitContextProvider = ({ children }: EtherspotTransacti
}

try {
const op = await etherspotPrimeSdkForChainId.sign();
const userOpHash = await etherspotPrimeSdkForChainId.send(op);
const estimated = await etherspotPrimeSdkForChainId.estimate();
const userOpHash = await etherspotPrimeSdkForChainId.send(estimated);
sentBatches.push({ ...estimatedBatch, via, userOpHash });
} catch (e) {
sentBatches.push({ ...estimatedBatch, via, errorMessage: (e instanceof Error && e.message) || 'Failed to estimate!' });
Expand Down

0 comments on commit 28b99db

Please sign in to comment.