Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha #253

Merged
merged 9 commits into from
Jul 10, 2024
Merged

Alpha #253

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: generate docs content
run: npx typedoc

- name: Copy generated documentation
- name: Copy generated documentation
run: |
mkdir -p quais-docs/sdk/content
cp -r docs/content/* quais-docs/sdk/content/
Expand Down
7 changes: 3 additions & 4 deletions dist/quais.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ function isCallException(error) {
* @param {string} message - The error message.
* @param {ErrorCode} code - The error code.
* @param {ErrorInfo<T>} [info] - Additional properties for the error.
*
* @returns {T} The new error.
*/
function makeError(message, code, info) {
Expand Down Expand Up @@ -19147,10 +19146,10 @@ class QuaiTransaction extends AbstractTransaction {
if (!this.originZone) {
throw new Error('Invalid Zone for from address');
}
if (!(this.from && this.to)) {
throw new Error('Missing from or to address');
if (!this.from) {
throw new Error('Missing from address');
}
const isSameLedger = isQuaiAddress(this.from) === isQuaiAddress(this.to);
const isSameLedger = !this.to || isQuaiAddress(this.from) === isQuaiAddress(this.to);
if (this.isExternal && !isSameLedger) {
throw new Error('Cross-zone & cross-ledger transactions are not supported');
}
Expand Down
2 changes: 1 addition & 1 deletion dist/quais.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/quais.min.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/quais.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
* @param {string} message - The error message.
* @param {ErrorCode} code - The error code.
* @param {ErrorInfo<T>} [info] - Additional properties for the error.
*
* @returns {T} The new error.
*/
function makeError(message, code, info) {
Expand Down Expand Up @@ -19170,10 +19169,10 @@ const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !==
if (!this.originZone) {
throw new Error('Invalid Zone for from address');
}
if (!(this.from && this.to)) {
throw new Error('Missing from or to address');
if (!this.from) {
throw new Error('Missing from address');
}
const isSameLedger = isQuaiAddress(this.from) === isQuaiAddress(this.to);
const isSameLedger = !this.to || isQuaiAddress(this.from) === isQuaiAddress(this.to);
if (this.isExternal && !isSameLedger) {
throw new Error('Cross-zone & cross-ledger transactions are not supported');
}
Expand Down
2 changes: 1 addition & 1 deletion dist/quais.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/quais.umd.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/wordlists-extra.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/wordlists-extra.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/transaction/quai-transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ export class QuaiTransaction extends AbstractTransaction<Signature> implements Q
if (!this.originZone) {
throw new Error('Invalid Zone for from address');
}
if (!(this.from && this.to)) {
throw new Error('Missing from or to address');
if (!this.from) {
throw new Error('Missing from address');
}

const isSameLedger = isQuaiAddress(this.from) === isQuaiAddress(this.to);
const isSameLedger = !this.to || isQuaiAddress(this.from) === isQuaiAddress(this.to);
if (this.isExternal && !isSameLedger) {
throw new Error('Cross-zone & cross-ledger transactions are not supported');
}
Expand Down
Loading