Socket
Socket
Sign inDemoInstall

@wormhole-foundation/sdk-connect

Package Overview
Dependencies
Maintainers
6
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wormhole-foundation/sdk-connect - npm Package Compare versions

Comparing version 0.5.3-beta.3 to 0.5.3-beta.4

12

dist/cjs/protocols/cctpTransfer.js

@@ -207,3 +207,3 @@ "use strict";

*/
if (this._state < types_js_1.TransferState.SourceInitiated || this._state > types_js_1.TransferState.Attested)
if (this._state < types_js_1.TransferState.SourceInitiated)
throw new Error("Invalid state transition in `fetchAttestation`");

@@ -217,2 +217,12 @@ const ids = this.transfer.automatic

this._state = types_js_1.TransferState.Attested;
if (this.attestations && this.attestations.length > 0) {
for (const _attestation of this.attestations) {
const { attestation } = _attestation;
if (!sdk_definitions_1.CircleBridge.isCircleAttestation(attestation))
continue;
const completed = await CircleTransfer.isTransferComplete(this.toChain, attestation);
if (completed)
this._state = types_js_1.TransferState.DestinationFinalized;
}
}
return ids;

@@ -219,0 +229,0 @@ }

@@ -129,2 +129,9 @@ "use strict";

this._state = types_js_1.TransferState.Attested;
if (this.attestations.length > 0) {
// Check if the transfer has been completed
const { attestation } = this.attestations[0];
const completed = await TokenTransfer.isTransferComplete(this.toChain, attestation);
if (completed)
this._state = types_js_1.TransferState.DestinationFinalized;
}
return this.attestations.map((vaa) => vaa.id);

@@ -131,0 +138,0 @@ }

@@ -204,3 +204,3 @@ import { circle, encoding, toChain } from "@wormhole-foundation/sdk-base";

*/
if (this._state < TransferState.SourceInitiated || this._state > TransferState.Attested)
if (this._state < TransferState.SourceInitiated)
throw new Error("Invalid state transition in `fetchAttestation`");

@@ -214,2 +214,12 @@ const ids = this.transfer.automatic

this._state = TransferState.Attested;
if (this.attestations && this.attestations.length > 0) {
for (const _attestation of this.attestations) {
const { attestation } = _attestation;
if (!CircleBridge.isCircleAttestation(attestation))
continue;
const completed = await CircleTransfer.isTransferComplete(this.toChain, attestation);
if (completed)
this._state = TransferState.DestinationFinalized;
}
}
return ids;

@@ -216,0 +226,0 @@ }

@@ -126,2 +126,9 @@ import { amount, encoding, toChain as toChainName } from "@wormhole-foundation/sdk-base";

this._state = TransferState.Attested;
if (this.attestations.length > 0) {
// Check if the transfer has been completed
const { attestation } = this.attestations[0];
const completed = await TokenTransfer.isTransferComplete(this.toChain, attestation);
if (completed)
this._state = TransferState.DestinationFinalized;
}
return this.attestations.map((vaa) => vaa.id);

@@ -128,0 +135,0 @@ }

6

package.json
{
"name": "@wormhole-foundation/sdk-connect",
"version": "0.5.3-beta.3",
"version": "0.5.3-beta.4",
"repository": {

@@ -78,6 +78,6 @@ "type": "git",

"axios": "^1.4.0",
"@wormhole-foundation/sdk-base": "0.5.3-beta.3",
"@wormhole-foundation/sdk-definitions": "0.5.3-beta.3"
"@wormhole-foundation/sdk-base": "0.5.3-beta.4",
"@wormhole-foundation/sdk-definitions": "0.5.3-beta.4"
},
"type": "module"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc