@exodus/solana-api 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/api.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Exodus internal Solana asset API wrapper",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@exodus/models": "^8.7.2",
|
|
22
22
|
"@exodus/nfts-core": "^0.5.0",
|
|
23
23
|
"@exodus/solana-lib": "^1.4.2",
|
|
24
|
-
"@exodus/solana-web3.js": "1.31.0-exodus.
|
|
24
|
+
"@exodus/solana-web3.js": "1.31.0-exodus.5",
|
|
25
25
|
"@ungap/url-search-params": "^0.2.2",
|
|
26
26
|
"bignumber.js": "^9.0.1",
|
|
27
27
|
"bn.js": "^4.11.0",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"node-fetch": "~2.6.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "bb05c26ac238aaa40d7ef7f366abdd9afb903b82"
|
|
38
38
|
}
|
package/src/api.js
CHANGED
|
@@ -801,10 +801,11 @@ export class Api {
|
|
|
801
801
|
/**
|
|
802
802
|
* Broadcast a signed transaction
|
|
803
803
|
*/
|
|
804
|
-
broadcastTransaction = async (signedTx: string): string => {
|
|
804
|
+
broadcastTransaction = async (signedTx: string, options): string => {
|
|
805
805
|
console.log('Solana broadcasting TX:', signedTx) // base64
|
|
806
|
+
const defaultOptions = { encoding: 'base64', preflightCommitment: 'finalized' }
|
|
806
807
|
|
|
807
|
-
const params = [signedTx, {
|
|
808
|
+
const params = [signedTx, { ...defaultOptions, ...options }]
|
|
808
809
|
const result = await this.rpcCall('sendTransaction', params, { forceHttp: true })
|
|
809
810
|
|
|
810
811
|
console.log(`tx ${JSON.stringify(result)} sent!`)
|